More checkpoints, adjustments for collision check
This commit is contained in:
BIN
checkpoints/bc-intersimple-setobs2.pt
Normal file
BIN
checkpoints/bc-intersimple-setobs2.pt
Normal file
Binary file not shown.
BIN
checkpoints/gail-options-setobs2-Feb15_18-49-05.pt
Normal file
BIN
checkpoints/gail-options-setobs2-Feb15_18-49-05.pt
Normal file
Binary file not shown.
BIN
checkpoints/gail-ppo-options-setobs2-Feb15_22-05-38.pt
Normal file
BIN
checkpoints/gail-ppo-options-setobs2-Feb15_22-05-38.pt
Normal file
Binary file not shown.
BIN
checkpoints/wgail-options-setobs2-Feb16_01-06-27.pt
Normal file
BIN
checkpoints/wgail-options-setobs2-Feb16_01-06-27.pt
Normal file
Binary file not shown.
BIN
checkpoints/wgail-ppo-options-setobs2-Feb16_04-02-56.pt
Normal file
BIN
checkpoints/wgail-ppo-options-setobs2-Feb16_04-02-56.pt
Normal file
Binary file not shown.
@@ -13,4 +13,11 @@ python -m src.eval_main
|
||||
# idm
|
||||
python -m src.eval_main --method=idm
|
||||
|
||||
python -m src.eval_main --method=ogail --policy_file='checkpoints/gail-options-setobs2-15-02-2022.pt' --env='NormalizedOptionsEvalEnv'
|
||||
# options GAIL
|
||||
python -m src.eval_main --method=ogail --policy_file='checkpoints/gail-options-setobs2-Feb15_18-49-05.pt' --env='NormalizedOptionsEvalEnv' --env_kwargs='{stop_on_collision:True}'
|
||||
|
||||
# options GAIL-PPO
|
||||
python -m src.eval_main --method=ogail-ppo --policy_file='checkpoints/gail-ppo-options-setobs2-Feb15_22-05-38.pt' --env='NormalizedOptionsEvalEnv' --env_kwargs='{stop_on_collision:True}'
|
||||
|
||||
# behavior cloning
|
||||
python -m src.eval_main --method=bc --policy_file='checkpoints/bc-intersimple-setobs2.pt' --env='NormalizedContinuousEvalEnv' --env_kwargs='{stop_on_collision:True}'
|
||||
|
||||
@@ -122,7 +122,7 @@ class IntersimpleEvaluation:
|
||||
done = local_vars['done']
|
||||
_agent = info['agent']
|
||||
env = local_vars['env'].envs[venv_i]
|
||||
assert isinstance(env, Intersimple)
|
||||
# assert isinstance(env, Intersimple)
|
||||
|
||||
self.eval_policy_step(info, done, _agent)
|
||||
|
||||
|
||||
@@ -25,11 +25,18 @@ def NormalizedOptionsEvalEnv(**kwargs):
|
||||
return OptionsEnv(Setobs(
|
||||
TransformObservation(IntersimpleLidarFlatIncrementingAgent(
|
||||
n_rays=5,
|
||||
stop_on_collision=False,
|
||||
**kwargs,
|
||||
), lambda obs: (obs - obs_min) / (obs_max - obs_min + 1e-10))
|
||||
), options=[(0, 5), (1, 5), (2, 5), (4, 5), (6, 5), (8, 5)])
|
||||
|
||||
def NormalizedContinuousEvalEnv(**kwargs):
|
||||
return Setobs(
|
||||
TransformObservation(IntersimpleLidarFlatIncrementingAgent(
|
||||
n_rays=5,
|
||||
**kwargs,
|
||||
), lambda obs: (obs - obs_min) / (obs_max - obs_min + 1e-10))
|
||||
)
|
||||
|
||||
class OptionsEnv(Wrapper):
|
||||
|
||||
def __init__(self, env, options):
|
||||
@@ -65,7 +72,7 @@ class OptionsEnv(Wrapper):
|
||||
o, r, d, i = super().step(u)
|
||||
actions[k] = u
|
||||
rewards[k] = r
|
||||
env_done[k+1] = d
|
||||
env_done[k] = d
|
||||
infos.append(i)
|
||||
observations[k+1] = o
|
||||
|
||||
@@ -84,7 +91,7 @@ class OptionsEnv(Wrapper):
|
||||
ll_obs, ll_actions, ll_rewards, ll_env_done, ll_plan_done, ll_infos, ll_steps = self.execute_plan(self.last_obs, self.options[a], render_mode)
|
||||
hl_obs = ll_obs[ll_steps]
|
||||
hl_reward = (ll_rewards * ~ll_plan_done).sum().item()
|
||||
hl_done = ll_env_done[ll_steps].item()
|
||||
hl_done = ll_env_done[ll_steps-1].item()
|
||||
hl_infos = {
|
||||
'll': {
|
||||
'observations': ll_obs,
|
||||
|
||||
Reference in New Issue
Block a user