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] Add "official" benchmark script for Atari PPO benchmarks (new API stack). #45697

Merged
merged 8 commits into from
Jun 5, 2024

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Jun 3, 2024

Add "official" benchmark script for Atari PPO benchmarks (new API stack).

  • The new script loops through a list of envs and calls the existing atari_ppo.py tuned_example script passing through some command line args.
  • We are currently still figuring out the exact setup to run with, but this script represents a decent 1st iteration.

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 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
@sven1977 sven1977 enabled auto-merge (squash) June 4, 2024 16:35
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Jun 4, 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.

commands.append(f"--env={env_name}")
commands.append(f"--wandb-run-name={env_name}")
print(f"Running {env_name} through command line=`{commands}`")
subprocess.run(commands)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is somehow strange to me that we emulate running from the command line which in turn runs a script that could have been triggered direclty in the loop. It makes sense to me that users can run single envs, but why not triggering them directly in the loop?

# AgileRL: https://github.com/AgileRL/AgileRL?tab=readme-ov-file#benchmarks
# [0] = reward to expect for DQN rainbow [1] = timesteps to run (always 200M for DQN
# rainbow).
# Note that for PPO, we simply run everything for 6M ts.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In atari_ppo.py the timesteps are set to 3M.

parser = add_rllib_example_script_args()
parser = add_rllib_example_script_args(
default_reward=float("inf"),
default_timesteps=3000000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here we have set 3M timesteps while above in the benchmark_atari_ppo.py we comment on 6M.

@sven1977 sven1977 merged commit d49f15b into ray-project:master Jun 5, 2024
7 checks passed
richardsliu pushed a commit to richardsliu/ray that referenced this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants