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

[docs] Add mode to Ray Tune quick start #14023

Merged
merged 2 commits into from
Feb 10, 2021
Merged

Conversation

Crissman
Copy link
Contributor

Why are these changes needed?

If mode is not specified in analysis.get_best_config, it gives this error:

Traceback (most recent call last):
  File "ray_quick.py", line 25, in <module>
    print("Best config: ", analysis.get_best_config(metric="mean_loss"))
  File "/users/Crissman/anaconda3/lib/python3.7/site-packages/ray/tune/analysis/experiment_analysis.py", line 607, in get_best_config
    best_trial = self.get_best_trial(metric, mode, scope)
  File "/users/Crissman/anaconda3/lib/python3.7/site-packages/ray/tune/analysis/experiment_analysis.py", line 538, in get_best_trial
    mode = self._validate_mode(mode)
  File "/users/Crissman/anaconda3/lib/python3.7/site-packages/ray/tune/analysis/experiment_analysis.py", line 82, in _validate_mode
    "No `mode` has been passed and  `default_mode` has "
ValueError: No `mode` has been passed and  `default_mode` has not been set. Please specify the `mode` parameter.

Related issue number

N/A

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
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

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

thanks a bunch for this catch!

@richardliaw richardliaw changed the title Add mode to Ray Tune quick start [docs] Add mode to Ray Tune quick start Feb 10, 2021
@richardliaw richardliaw merged commit 05ab75f into ray-project:master Feb 10, 2021
@Crissman Crissman deleted the mode branch February 12, 2021 02:22
fishbone pushed a commit to fishbone/ray that referenced this pull request Feb 16, 2021
fishbone added a commit to fishbone/ray that referenced this pull request Feb 16, 2021
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.

2 participants