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] Better behavior if user does not specify stopping condition in RLLib CLI #31078

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

ArturNiederfahrenhorst
Copy link
Contributor

@ArturNiederfahrenhorst ArturNiederfahrenhorst commented Dec 13, 2022

Signed-off-by: Artur Niederfahrenhorst [email protected]

Why are these changes needed?

We have lots of examples inside RLlib of running ray CLI similar to rllib train --env ... --config ... that lack a stopping condition.
They error out with the following message.

Screenshot 2022-12-13 at 23 06 18

We should not error out, since a workflow to be expected from us is to quickly start an experiment from CLI, observe it and cancel it manually without caring for stopping condidations.

Related issue number

https://discuss.ray.io/t/problem-with-rllib-configuration-by-command-line/8624

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 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: Artur Niederfahrenhorst <[email protected]>
rllib/common.py Outdated
@@ -216,7 +218,7 @@ class CLIArguments:

# Train arguments
# __cli_train_start__
Stop = typer.Option(None, "--stop", "-s", help=get_help("stop"))
Stop = typer.Option(None, *STOP_ARG_NAMES, help=get_help("stop"))
Copy link
Contributor

Choose a reason for hiding this comment

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

@ArturNiederfahrenhorst hmm, I think you can fix all of this by making the default arg "{}" instead of None

Copy link
Contributor

@maxpumperla maxpumperla left a comment

Choose a reason for hiding this comment

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

great, thanks for spotting this @ArturNiederfahrenhorst! I think we can simplify

Signed-off-by: Artur Niederfahrenhorst <[email protected]>
@ArturNiederfahrenhorst
Copy link
Contributor Author

@maxpumperla I have also removed the warning I introduced about stop being empty to simplify this.
Do you think that's a good idea or would you like it back?

@maxpumperla
Copy link
Contributor

@ArturNiederfahrenhorst I think we can add this to the typer help of the stop command, if not already there

@ArturNiederfahrenhorst
Copy link
Contributor Author

@maxpumperla Info on how to use stop is already in the help string. I'll leave it there and not warn users when it's missing.

@sven1977 sven1977 merged commit e40674c into ray-project:master Dec 14, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
@ArturNiederfahrenhorst ArturNiederfahrenhorst deleted the fixclibehavior branch January 5, 2023 15:38
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
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