fix itr initialization in eval agents
This commit is contained in:
parent
e0842e71dc
commit
4e14b8086d
@ -28,7 +28,7 @@ class EvalDiffusionAgent(EvalAgent):
|
||||
if self.render_video:
|
||||
for env_ind in range(self.n_render):
|
||||
options_venv[env_ind]["video_path"] = os.path.join(
|
||||
self.render_dir, f"itr-{self.itr}_trial-{env_ind}.mp4"
|
||||
self.render_dir, f"eval_trial-{env_ind}.mp4"
|
||||
)
|
||||
|
||||
# Reset env before iteration starts
|
||||
@ -62,7 +62,7 @@ class EvalDiffusionAgent(EvalAgent):
|
||||
)
|
||||
reward_trajs[step] = reward_venv
|
||||
firsts_trajs[step + 1] = terminated_venv | truncated_venv
|
||||
|
||||
|
||||
# update for next step
|
||||
prev_obs_venv = obs_venv
|
||||
|
||||
|
@ -32,7 +32,7 @@ class EvalImgDiffusionAgent(EvalAgent):
|
||||
if self.render_video:
|
||||
for env_ind in range(self.n_render):
|
||||
options_venv[env_ind]["video_path"] = os.path.join(
|
||||
self.render_dir, f"itr-{self.itr}_trial-{env_ind}.mp4"
|
||||
self.render_dir, f"eval_trial-{env_ind}.mp4"
|
||||
)
|
||||
|
||||
# Reset env before iteration starts
|
||||
@ -65,7 +65,7 @@ class EvalImgDiffusionAgent(EvalAgent):
|
||||
)
|
||||
reward_trajs[step] = reward_venv
|
||||
firsts_trajs[step + 1] = terminated_venv | truncated_venv
|
||||
|
||||
|
||||
# update for next step
|
||||
prev_obs_venv = obs_venv
|
||||
|
||||
|
@ -28,7 +28,7 @@ class EvalGaussianAgent(EvalAgent):
|
||||
if self.render_video:
|
||||
for env_ind in range(self.n_render):
|
||||
options_venv[env_ind]["video_path"] = os.path.join(
|
||||
self.render_dir, f"itr-{self.itr}_trial-{env_ind}.mp4"
|
||||
self.render_dir, f"eval_trial-{env_ind}.mp4"
|
||||
)
|
||||
|
||||
# Reset env before iteration starts
|
||||
|
@ -32,7 +32,7 @@ class EvalImgGaussianAgent(EvalAgent):
|
||||
if self.render_video:
|
||||
for env_ind in range(self.n_render):
|
||||
options_venv[env_ind]["video_path"] = os.path.join(
|
||||
self.render_dir, f"itr-{self.itr}_trial-{env_ind}.mp4"
|
||||
self.render_dir, f"eval_trial-{env_ind}.mp4"
|
||||
)
|
||||
|
||||
# Reset env before iteration starts
|
||||
|
Loading…
Reference in New Issue
Block a user