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] check for running session #10840

Merged
merged 4 commits into from
Sep 17, 2020

Conversation

richardliaw
Copy link
Contributor

@richardliaw richardliaw commented Sep 16, 2020

Why are these changes needed?

Hard to detect if in Tune session.
Closes #10839

Related issue number

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/latest/.
  • 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 :(

@mil-ad
Copy link

mil-ad commented Sep 16, 2020

get_session() is currently not exposed in __all__ but is it a good idea to expose the session object to the outside world? There's not much they can do with it anyway is there? I think it's better to also add an explicit method like is_running() or whatever that then returns get_session(warn=False) is None.

@richardliaw
Copy link
Contributor Author

@mi-lad good point. I've adjusted the PR and added a test.

@richardliaw richardliaw changed the title [tune] fix session get [tune] check for running session Sep 16, 2020
Copy link
Contributor

@amogkam amogkam left a comment

Choose a reason for hiding this comment

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

LGTM

@richardliaw richardliaw merged commit d3feb83 into ray-project:master Sep 17, 2020
@richardliaw richardliaw deleted the fix-session branch September 17, 2020 01:55
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.

[tune] How to test if I'm running inside a tune session?
3 participants