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.
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 usingPreTrainedModel
itself #28405[
core
/ FEAT] Add the possibility to push custom tags usingPreTrainedModel
itself #28405Changes from 23 commits
dd5cbe3
f78ed31
da00274
1180585
3485b10
4b82255
4c7806e
8b89796
e73dc7b
fbef2de
0e4daad
c19e751
eb93371
1fe93b3
a24ad9b
6cfd6f5
40a1d4b
dc31941
acd676b
db3197d
f14cf93
31117f4
36f2cb7
514f13b
b3d5900
22d3412
85584ae
1e3fc1e
59738c6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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
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.
@Wauplin @amyeroberts fine to assume that
repo_type
will always be set to"model"
inModelCard.load()
(inspecting at that methods signature)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 definitely,
repo_type="model"
is implicit when usingModelCard
.(the parameter exists because
ModelCard
inherits from the genericRepoCard
. Not a perfect design-choice but it's fine :) )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.
ok perfect! let's keep it like that then
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 copied this from ModelCard.load_card docstring
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.
Isn't it problematic to have a fixed name for the repo_id? This could lead to conflicts if several CIs are ran in parallel. Using a unique id (uuid) would avoid that.
(not an expert of
transformers
's CI though. It's just that I've experienced similar problem inhuggingface_hub
's CI in the past)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.
Hmm good point, we do the same things for all tests above so perhaps it is fine, I will let @ydshieh comment on this if he has more insights than me