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

Add warnings if training args differ from checkpoint trainer state #29255

Merged

Conversation

jonflynng
Copy link
Contributor

@jonflynng jonflynng commented Feb 23, 2024

What does this PR do?

Resolves #28867

Before submitting

Who can review?

@ArthurZucker

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.

@jonflynng jonflynng marked this pull request as ready for review February 25, 2024 23:14
@@ -1370,6 +1370,29 @@ def ipex_optimize_model(self, model, training=False, dtype=torch.float32):

return model

def compare_trainer_and_checkpoint_args(self, training_args, trainer_state):
attributes_map = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are some parameters I expected to be overridden via the training_args when resuming from a checkpoint.

@jonflynng jonflynng changed the title Add warnings if training args differ Add warnings if training args differ from checkpoint trainer state Feb 26, 2024
@ArthurZucker
Copy link
Collaborator

cc @muellerzr !

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

This LGTM, @muellerzr fine with you ?

@HuggingFaceDocBuilderDev

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.

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks! LG2M as well 🤗

@ArthurZucker ArthurZucker merged commit b5a6d6e into huggingface:main Mar 26, 2024
21 checks passed
hovnatan pushed a commit to hovnatan/transformers that referenced this pull request Mar 27, 2024
…uggingface#29255)

* add warnings if training args differ from checkpoint args stored in trainer_state.json

* run formatting and styling

* add a test

* format and styling

---------

Co-authored-by: Jonathan Flynn <jonl.flynn@guardian.co.uk>
itazap pushed a commit that referenced this pull request May 14, 2024
…29255)

* add warnings if training args differ from checkpoint args stored in trainer_state.json

* run formatting and styling

* add a test

* format and styling

---------

Co-authored-by: Jonathan Flynn <jonl.flynn@guardian.co.uk>
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.

Training arguments are not applied when resuming from a checkpoint
4 participants