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] Use queue to display JupyterNotebookReporter updates in Ray client #19137

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Oct 6, 2021

Why are these changes needed?

Jupyter notebook HTML updates need access to the main process stdout - however, this is not available in remote tune.run calls (e.g. via Ray client). This PR introduces an execution queue that can be utilized to display Jupyter notebook updates.

Related issue number

Closes #16016

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

remote_future = remote_run.remote(_remote=False, **remote_run_kwargs)

# ray.wait(...)[1] returns futures that are not ready, yet
while ray.wait([remote_future], timeout=1)[1]:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to make this timeout=0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will then iterate through the loop too fast as we're not blocking anywhere. I decreased the timeout to 0.2 though to allow a more responsive experience.

python/ray/tune/tune.py Outdated Show resolved Hide resolved
python/ray/tune/utils/util.py Show resolved Hide resolved
@krfricke krfricke merged commit e5e1ba9 into ray-project:master Oct 8, 2021
@krfricke krfricke deleted the tune/client-jupyter branch October 8, 2021 17:23
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] JupyterNotebookReporter not working with ray.util.connect()
3 participants