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

[rllib] Use compress observations where replay buffers and image obs are used in tuned examples #26735

Conversation

avnishn
Copy link
Member

@avnishn avnishn commented Jul 19, 2022

Many of our tuned examples using replay and atari wouldn't be able to run on clusters or single node machines because they'll oom without enabling this compression.

Signed-off-by: avnish [email protected]

Why are these changes needed?

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit nit nit
can we write the comments more formally, like:
Compress observations to make sure the size of the ReplayBuffer fits most computers.
something like that? not really good at wording, but you get the idea.
thanks.

@avnishn
Copy link
Member Author

avnishn commented Jul 19, 2022

could I change
"we should set this because few machines would be able to contain the replay buffers in memory otherwise" to

"we should set compress_observations to True because few machines would be able to contain the replay buffers in memory otherwise"

is that descriptive enough?

@avnishn
Copy link
Member Author

avnishn commented Jul 22, 2022

I addressed the comments, but during today's experiments realized that only pong examples need obs compression so I turned off the compression in the non pong examples that I changed before.

min_sample_timesteps_per_iteration: 25000
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just needed a newline

Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good trick.

@gjoliver
Copy link
Member

@richardliaw please merge

@richardliaw richardliaw changed the title Use compress observations where replay buffers and image obs are used in tuned examples [rllib] Use compress observations where replay buffers and image obs are used in tuned examples Jul 22, 2022
@richardliaw richardliaw merged commit 2a0ef66 into ray-project:master Jul 22, 2022
Rohan138 pushed a commit to Rohan138/ray that referenced this pull request Jul 28, 2022
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
…are used in tuned examples (ray-project#26735)

Signed-off-by: Stefan van der Kleij <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants