-
Notifications
You must be signed in to change notification settings - Fork 29.2k
separate model card git push from the rest #13514
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
adb38ca
separate model card git push from the rest
73ce112
Update src/transformers/trainer.py
elishowk 9c20f81
catch only EnvironmentError in push_to_hub
5255d1c
point documentation on model card schema to the hub's
3eabf1d
Merge branch 'master' into fix-trainer-modelcard
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure whether it's best to catch the error and log it, or just let it be raised naturally. I don't have a strong opinion on this so let's see what others 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.
Yes me neither IDK, it's an ergonomy issue because at this stage, the training has been pushed, so the question is what should we do with a faulty Readme ?
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.
And without forgetting fixing model card metadata generation like with this issue #13528
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.
@LysandreJik, any thoughts?
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.
If this happens mid-training, I would advocate for a very visible warning that the model card is incorrect, rather than erroring out. However, if it's possible to generate the model card before the training/evaluation starts (I understand some values will be invalid such as evaluation results) and identify a potential failure there, then we could error out.
Definitely fine to just log the error though.
PS: Shouldn't the exception caught be a bit more specific than
Exception
?Uh oh!
There was an error while loading. Please reload this page.
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.
About the warnings on git push : git push warnings are now logged as a logger.warning cf. https://github.com/huggingface/huggingface_hub/pull/326/files
As explained the docs https://huggingface.co/transformers/main_classes/trainer.html?highlight=trainer#logging, the only possibility (AFAIK) where a user could not see the warning is if her/his script using transformers sets the
logLevel
toerror
only. Elsewhere, the user gets the same warning as huggingface-cli users. Am i wrong ?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 think logging at the error level is fine. Can you remove the PR from draft and mrge it?
Uh oh!
There was an error while loading. Please reload this page.
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.
Done, please note that I mixed (may be I'm wring) a commit to update to the docs, because huggingface/model_card is gonna be deprecated soon I think
If not its place here, I can remove it
Uh oh!
There was an error while loading. Please reload this page.
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 resolved the conflict by adding blocking=blocking. Is it okay for you ?