-
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] Fix docstring failures #32484
Conversation
Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
... ) | ||
>>> tuner.fit() | ||
== Status ==... | ||
>>> print("[ignore]"); result_grid = tuner.fit() # doctest: +ELLIPSIS |
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.
Any other way of doing this? This was the only workaround I could find :(
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.
I guess lambda config: {"metric": 1}
or something would work, but also happy with this. LMK what you think
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.
Oh, for the training function, I wanted it to actually show the stopper being used -- maybe I'll actually reduce this to 1 second - 5 is a bit excessive.
The print("[ignore]")
workaround to catch the Tune output is what I'm wondering about.
... ) | ||
>>> tuner.fit() | ||
== Status ==... | ||
>>> print("[ignore]"); result_grid = tuner.fit() # doctest: +ELLIPSIS |
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.
I guess lambda config: {"metric": 1}
or something would work, but also happy with this. LMK what you think
@krfricke Looks like it's good to merge. |
This fixes broken doctests on the 2.3 release branch, let's merge this ASAP. |
This PR fixes the `Stopper` doctests that are erroring. Previously, it used a `tune.Trainable` as its trainable, which would error on fit since its methods are not implemented. Also, it was missing some imports. Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
* [Tune] Fix docstring failures (#32484) This PR fixes the `Stopper` doctests that are erroring. Previously, it used a `tune.Trainable` as its trainable, which would error on fit since its methods are not implemented. Also, it was missing some imports. Signed-off-by: Justin Yu <justinvyu@berkeley.edu> * Make these doctest fixes extra safe Signed-off-by: Justin Yu <justinvyu@berkeley.edu> Remove unnecessary imports Signed-off-by: Justin Yu <justinvyu@berkeley.edu> --------- Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
This PR fixes the `Stopper` doctests that are erroring. Previously, it used a `tune.Trainable` as its trainable, which would error on fit since its methods are not implemented. Also, it was missing some imports. Signed-off-by: Justin Yu <justinvyu@berkeley.edu> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Why are these changes needed?
This PR fixes the
Stopper
doctests that are erroring. Previously, it used atune.Trainable
as its trainable, which would error on fit since its methods are not implemented. Also, it was missing some imports.Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.