Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Evaluation video overwritten #14

Closed
medric49 opened this issue Nov 17, 2021 · 2 comments
Closed

Evaluation video overwritten #14

medric49 opened this issue Nov 17, 2021 · 2 comments

Comments

@medric49
Copy link
Contributor

I have noticed, in this line when you are saving evaluation episodes, that you are actually overwriting previous evaluation videos of the same global frame when num_eval_episodes > 1.

            self.video_recorder.save(f'{self.global_frame}.mp4')

The attribute self.global_frame doesn't change during the self.cfg.num_eval_episodes evaluations in the loop.

I would propose this line instead

            self.video_recorder.save(f'{self.global_frame}_{episode}.mp4')

or other things like that.

@medric49
Copy link
Contributor Author

Finally, I understood what you did with this line

            self.video_recorder.init(self.eval_env, enabled=(episode == 0))

You record only the first evaluation episode.

Is there any reason?

@denisyarats
Copy link
Contributor

Hi, there is no overwrite, since only the first episode is being recorded. If you need to save videos for more episodes you can change it locally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants