-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[core
/ FEAT] Add the possibility to push custom tags using PreTrainedModel
itself
#28405
Merged
younesbelkada
merged 29 commits into
huggingface:main
from
younesbelkada:set-custom-tag
Jan 15, 2024
Merged
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
dd5cbe3
v1 tags
younesbelkada f78ed31
remove unneeded conversion
younesbelkada da00274
v2
younesbelkada 1180585
rm unneeded warning
younesbelkada 3485b10
Merge remote-tracking branch 'upstream/main' into set-custom-tag
younesbelkada 4b82255
add more utility methods
younesbelkada 4c7806e
Update src/transformers/utils/hub.py
younesbelkada 8b89796
Update src/transformers/utils/hub.py
younesbelkada e73dc7b
Update src/transformers/utils/hub.py
younesbelkada fbef2de
more enhancements
younesbelkada 0e4daad
oops
younesbelkada c19e751
merge tags
younesbelkada eb93371
clean up
younesbelkada 1fe93b3
revert unneeded change
younesbelkada a24ad9b
Merge remote-tracking branch 'upstream/main' into set-custom-tag
younesbelkada 6cfd6f5
add extensive docs
younesbelkada 40a1d4b
more docs
younesbelkada dc31941
more kwargs
younesbelkada acd676b
add test
younesbelkada db3197d
oops
younesbelkada f14cf93
fix test
younesbelkada 31117f4
Update src/transformers/modeling_utils.py
younesbelkada 36f2cb7
Update src/transformers/utils/hub.py
younesbelkada 514f13b
Update src/transformers/modeling_utils.py
younesbelkada b3d5900
Update src/transformers/trainer.py
younesbelkada 22d3412
Update src/transformers/modeling_utils.py
younesbelkada 85584ae
Merge remote-tracking branch 'upstream/main' into set-custom-tag
younesbelkada 1e3fc1e
add more conditions
younesbelkada 59738c6
more logic
younesbelkada 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 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
The current if/lse logic means:
self.model_tags
isNone
andtags
aren't passed inkwargs['tags']
is set toNone
. Do we want this or notags
kwarg at all?*- just realised I'm wrong as kwargs are passed otherwise 🙃tags
are only used ifself.model_tags
is notNone
.Another Q
kwargs["tags"]
is a string here too?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 your suggestion sounds great, also
It can be strings, let me adapt a bit the logic after accepting your suggestion
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 just took care of the str case in 1e3fc1e