fix itr initialization in eval agents

This commit is contained in:
allenzren 2024-10-10 14:10:16 -04:00
parent e0842e71dc
commit 4e14b8086d
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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