Support specifying revision in push_to_hub#25578
Merged
sgugger merged 1 commit intohuggingface:mainfrom Aug 22, 2023
Merged
Conversation
Collaborator
|
cc @sgugger |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
sgugger
approved these changes
Aug 18, 2023
src/transformers/utils/hub.py
Outdated
Collaborator
There was a problem hiding this comment.
Suggested change
| revision (`str`, *optional*, defaults to None): | |
| revision (`str`, *optional*): |
Nit: we don't write the default when it's None as it's implied by optional.
Wauplin
approved these changes
Aug 18, 2023
Contributor
Wauplin
left a comment
There was a problem hiding this comment.
Looks good to me!
It's unusual in huggingface_hub to proactively create the branch to push to when it doesn't exist but it actually makes sense so why not :)
Collaborator
|
Thanks again! |
|
@jmif what is the syntax for using the revision? I tried: but that just pushed to main. |
Collaborator
|
@RonanKMcGovern could you open a new issue with the output of |
parambharat
pushed a commit
to parambharat/transformers
that referenced
this pull request
Sep 26, 2023
Support revision in push_to_hub
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #22867 by adding revision to
create_commitcall and proactively creating the branch before committing.Change hasn't been discussed or approved in an issue AFAIK. Haven't written tests but happy to once the general approach is approved. I've tested manually and the changes work.