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] Metrics do-over 06: Remove render_images/with_render_images from MAEps and -runner and deprecate env_render config option. #45109

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented May 2, 2024

Metrics do-over 06:

  • Remove render_images/with_render_images from MAEps and MAEnvRunner
  • deprecate render_env algo config option (in favor of new WandB and MetricsLogger based examples).

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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 :(

Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label May 2, 2024
Copy link
Collaborator

@simonsays1980 simonsays1980 left a comment

Choose a reason for hiding this comment

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

LGTM. A single question in regard to simplifying rendering for users.

# with the data to be learned from, which should be the only thing an episode
# has to be concerned with).
# RGB uint8 images from rendering the env.
assert render_images is None or observations is not None
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like that this goes away from the MAE. On the opposite: the user has now to take care of rendering in a custom Callback, doesn't she? Could we create maybe a callback that is appended as soon as a user wants to render?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Valid point. My take on this is that RLlib with its distributed nature is too complicated to make this a simple config flag (like we tried this on the old stack). With the custom callback example, the user has all the possibilities now to write their own filtering logic: Do I only want eval episodes? Do I want all EnvRunners to log videos or just index=2?
Do I want all episodes or just the best performing ones? Etc..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, I wanted to go away from the notion that rendering always means having a live video play out in front of you. Videos are huge things, they should be logged safely to something like WandB and not written en masse to local disk or displayed on a screen and then disappear again.

@sven1977 sven1977 merged commit eec64b2 into ray-project:master May 2, 2024
5 checks passed
@sven1977 sven1977 deleted the metrics_do_over_06_remove_all_render_stuff_from_env_runners_and_episodes branch May 2, 2024 13:14
harborn pushed a commit to harborn/ray that referenced this pull request May 8, 2024
…s` from MAEps and -runner and deprecate `env_render` config option. (ray-project#45109)
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request May 13, 2024
…s` from MAEps and -runner and deprecate `env_render` config option. (ray-project#45109)

Signed-off-by: pdmurray <peynmurray@gmail.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
…s` from MAEps and -runner and deprecate `env_render` config option. (ray-project#45109)

Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
…s` from MAEps and -runner and deprecate `env_render` config option. (ray-project#45109)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants