-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Remove trial table when running Ray Train in a Jupyter notebook #44858
Conversation
Signed-off-by: Hongpeng Guo <[email protected]>
Signed-off-by: Hongpeng Guo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small comment:
python/ray/tune/progress_reporter.py
Outdated
@@ -1520,7 +1520,8 @@ def _detect_reporter(**kwargs) -> TuneReporterBase: | |||
|
|||
Keyword arguments are passed on to the reporter class. | |||
""" | |||
if IS_NOTEBOOK: | |||
_trainer_api = kwargs.pop("_trainer_api", False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add _trainer_api
as a keyword argument separate from kwargs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added a keyword arg _trainer_api
for the function _detect_reporter()
.
trainer_reporter = _detect_reporter(_trainer_api=True) | ||
self.assertFalse(isinstance(trainer_reporter, JupyterNotebookReporter)) | ||
self.assertTrue(isinstance(trainer_reporter, CLIReporter)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test!
Signed-off-by: Hongpeng Guo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Why are these changes needed?
This PR removes the trial table mistakenly displayed during Ray Train in a Jupyter notebook, which should only appear in Ray Tune sessions.
Related issue number
Closes #44776
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.