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

[tune] Fix Analysis.dataframe() documentation and enable passing of mode=None #18850

Merged
merged 2 commits into from
Sep 23, 2021

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Sep 23, 2021

Why are these changes needed?

cc @amogkam

Related issue number

Closes #17923

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 :(

@krfricke krfricke changed the title [tune] Fix Analysis.dataframe()` documentation and enable passing o… [tune] Fix Analysis.dataframe() documentation and enable passing of mode=None` Sep 23, 2021
@krfricke krfricke changed the title [tune] Fix Analysis.dataframe() documentation and enable passing of mode=None` [tune] Fix Analysis.dataframe() documentation and enable passing of mode=None Sep 23, 2021
Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question!

@@ -343,6 +355,7 @@ def _retrieve_rows(self,
metric: Optional[str] = None,
mode: Optional[str] = None) -> Dict[str, Any]:
assert mode is None or mode in ["max", "min"]
assert not mode or metric
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be !mode or metric or !(mode or metric)? Could we use parenthesis here to make it clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is supposed to be !mode or metric i.e. if mode is set, metric has to be set as well

@krfricke krfricke merged commit 2d46e0e into ray-project:master Sep 23, 2021
@krfricke krfricke deleted the tune/analysis-df-mode branch September 23, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants