Ensure final evaluation runs with step-based evaluation strategy#44146
Ensure final evaluation runs with step-based evaluation strategy#44146SunMarc merged 24 commits intohuggingface:mainfrom
Conversation
0490497 to
4d25e5f
Compare
|
cc @SunMarc |
SunMarc
left a comment
There was a problem hiding this comment.
Hey, as I commented, I think that the easier solution would be to update the callback to set should_evaluate to True at the end of the training is the user choose step
Not able to see your comment, but I think I understood, let me update PR. |
|
@SunMarc what do you think ? |
SunMarc
left a comment
There was a problem hiding this comment.
Thanks ! just left a couple of questions !
Agreed with yours asks, there were specific test failures related to some of them in CI that I had to add these many, else my first commit after your comment was just simple if and setting should_evaluate=True |
|
@SunMarc I have updated PR, earlier I added condition to avoid test changes as behavior changed for some, so now I have kept logic to check simple and changed some tests. Thanks |
|
@SunMarc Any update on this ? I updated and addressed all your queries. |
There was a problem hiding this comment.
Thanks, please update the description of the PR. cc @qgallouedec @winglian wdyt ?
|
@qgallouedec addressed delay issue with tests update, can you review it again. Thanks |
|
@SunMarc how can I take this forward to merge, I did took care of @qgallouedec' all feedback. |
|
@qgallouedec how can I take this forward ? already made changes as per your feedback. |
|
@SunMarc @qgallouedec how can I take this forward to merge. Thanks |
|
@Rocketknight1 any help to take this forward, as it is approved and I took care of all feedbacks. |
|
@Rocketknight1 @qgallouedec @SunMarc Any help to merge this forward ? I took care of all the feedback. |
952a90d to
b26cb69
Compare
|
@Rocketknight1 @SunMarc breaking test does not seem to be related to my change |
|
@SunMarc @Rocketknight1 ANy update for this issue. Thanks |
|
@SunMarc @qgallouedec can you please help with taking this forward to merge. Thanks |
|
merged ! |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
@SunMarc thanks for trying to merge, I think it needed branch update wit main, and CI test failure were not related to my change. So if you merge now it will be successful. Thanks |
…gingface#44146) * rebase * merge conflict * merge conflict1 * merge conflict trainer * blank space qulity run * lint error * modify test to address our change * rebase * rebase * rebase * rebase * test updated with delay check * checkpoint tests updated * test updated in utils * correct test condition * style format
…gingface#44146) * rebase * merge conflict * merge conflict1 * merge conflict trainer * blank space qulity run * lint error * modify test to address our change * rebase * rebase * rebase * rebase * test updated with delay check * checkpoint tests updated * test updated in utils * correct test condition * style format
What does this PR do?
When using a step-based evaluation strategy (IntervalStrategy.STEPS), the trainer may skip evaluation at the final step if the last step does not align with eval_steps.
This avoids missing the final evaluation while also preventing duplicate evaluations when the last step already matches eval_steps.
In short:
We now guarantee a final evaluation for step-based strategies without double-evaluating.
Fixes #43935
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.