-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Train] Report only once in SklearnTrainer
#30593
[Train] Report only once in SklearnTrainer
#30593
Conversation
Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
@Yard1 is this a bug in Tune? Report is only being called once right? |
@amogkam It's more a quirk of Tune - obviously, Tune doesn't know ahead of time if the report its getting will be the last one (unless "done" is explicitly passed in there) - in which case, the functional trainable does the following:
I suppose a more generic fix to this issue would be to not print the duplicate result, as duplicate printing is the main issue here. Logic should be otherwise correct in all cases. |
Yeah I guess my main question is does this duplicate printing apply to function trainables as well? Since I've never seen any of our function trainable examples report with If that's the case, then I think we should avoid the duplicate printing on the Tune side. |
Yeah the duplicate printing with functional trainable is the exact issue here. It's not unique to SklearnTrainer, but it's easy to miss it with trainers that report multiple times (because it's just one more result printout out of dozens or hundreds). Also, we print out a result only if n seconds have passed since last printout OR if this is a result with |
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.
Sounds good. Can we also fix the duplicate printing on the Tune side as well?
Sets "done": True in the SklearnTrainer report so that it only print the results only once. Signed-off-by: Antoni Baum <antoni.baum@protonmail.com> Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Signed-off-by: Antoni Baum antoni.baum@protonmail.com
Why are these changes needed?
Sets
"done": True
in theSklearnTrainer
report so that it only print the results only once.Related issue number
Closes #29226
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.