Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor CartPole-v0 not recording every episode #494

Closed
cpatyn opened this issue Feb 9, 2017 · 3 comments

Comments

@cpatyn
Copy link

@cpatyn cpatyn commented Feb 9, 2017

In the documentation it says that every episode will be recorded as long as the environment returns done = True. However my Monitor only seems to record episodes sporadically. Is this intentional? And if so, is there a way to record all episodes?

@tlbtlbtlb

This comment has been minimized.

Copy link
Contributor

@tlbtlbtlb tlbtlbtlb commented Feb 9, 2017

The statistics recorder records all episodes, but by default the video recorder only captures a sampling of episodes (those with episodes numbers which are perfect cubes: 1, 8, 27, 64, ... and then every 1000th). Otherwise, videos get huge during long training runs. But if you want to record everything, create the monitor with:

   env = gym.wrappers.Monitor(env, directory, video_callable=lambda episode_id: True)

Or if you want to record every 10th:

   env = gym.wrappers.Monitor(env, directory, video_callable=lambda episode_id: episode_id%10==0)
@fuxianh

This comment has been minimized.

Copy link

@fuxianh fuxianh commented Oct 18, 2018

@tlbtlbtlb It seems record cannot be used in a newest version of baseline. Do you have any suggestions? Thank you.

@tlbtlbtlb

This comment has been minimized.

Copy link
Contributor

@tlbtlbtlb tlbtlbtlb commented Oct 18, 2018

@fuxianh I'm no longer working on Gym. I suggest reporting a bug complete with an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.