-
Notifications
You must be signed in to change notification settings - Fork 608
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
New endpoint: create_commits_on_pr
#1375
Conversation
The documentation is not available anymore as the PR was closed or merged. |
commit_by_chunks
commit_in_chunks
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1375 +/- ##
==========================================
- Coverage 84.34% 82.08% -2.27%
==========================================
Files 52 49 -3
Lines 5430 5168 -262
==========================================
- Hits 4580 4242 -338
- Misses 850 926 +76
... and 11 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
(nit) I think you could say "commit" instead of "step" or "chunk" no ? And call this a "multi-commit operation" ? This way you don't introduce new terms.
commit_in_chunks
create_commits_on_pr
@lhoestq I have updated the PR to introduce less terminology |
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.
Love it !
The code looks good to me @Wauplin, but I'll let @julien-c approve/reject it as he might have opinions about opening PRs |
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.
looks good to me from quick glance!
As a first start for this feature, I'll release it as "experimental" meaning it triggers a warning when used ("we do not guarantee long-term support"). I'm doing so to ensure we have flexibility if we want to re-think this process in the future. |
Step 2 of #1352 (see #1352 (comment)).
Here is my test repo with an example of PR where I pushed all the
huggingface_hub
source code to the repo. This is a toy example but it should work the same no matter the number and size of the files.EDIT: I refactored the implementation / the description.
High-level example:
=> existing files are deleting and local folder is uploaded. Happens in multiple commits, pushed to a PR. PR is either merged (if
create_pr=False
) or not.Low-level example:
How it works internally:
merge_pr=True
.TODO: