Skip to content

Commit 41b7aaf

Browse files
prepare for release v0.27 (#2622)
* prepare for release v0.27 * Add tip * fix tests
1 parent 40a64c8 commit 41b7aaf

File tree

8 files changed

+8
-785
lines changed

8 files changed

+8
-785
lines changed

docs/source/en/guides/upload.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -234,41 +234,8 @@ Future(...)
234234
### Upload a folder by chunks
235235

236236
[`upload_folder`] makes it easy to upload an entire folder to the Hub. However, for large folders (thousands of files or
237-
hundreds of GB), it can still be challenging. If you have a folder with a lot of files, you might want to upload
238-
it in several commits. If you experience an error or a connection issue during the upload, you would not have to resume
239-
the process from the beginning.
240-
241-
To upload a folder in multiple commits, just pass `multi_commits=True` as argument. Under the hood, `huggingface_hub`
242-
will list the files to upload/delete and split them in several commits. The "strategy" (i.e. how to split the commits)
243-
is based on the number and size of the files to upload. A PR is open on the Hub to push all the commits. Once the PR is
244-
ready, the commits are squashed into a single commit. If the process is interrupted before completing, you can rerun
245-
your script to resume the upload. The created PR will be automatically detected and the upload will resume from where
246-
it stopped. It is recommended to pass `multi_commits_verbose=True` to get a better understanding of the upload and its
247-
progress.
248-
249-
The example below will upload the checkpoints folder to a dataset in multiple commits. A PR will be created on the Hub
250-
and merged automatically once the upload is complete. If you prefer the PR to stay open and review it manually, you can
251-
pass `create_pr=True`.
237+
hundreds of GB), we recommend using [`upload_large_folder`], which splits the upload into multiple commits. See the [Upload a large folder](#upload-a-large-folder) section for more details.
252238

253-
```py
254-
>>> upload_folder(
255-
... folder_path="local/checkpoints",
256-
... repo_id="username/my-dataset",
257-
... repo_type="dataset",
258-
... multi_commits=True,
259-
... multi_commits_verbose=True,
260-
... )
261-
```
262-
263-
If you want a better control on the upload strategy (i.e. the commits that are created), you can have a look at the
264-
low-level [`plan_multi_commits`] and [`create_commits_on_pr`] methods.
265-
266-
<Tip warning={true}>
267-
268-
`multi_commits` is still an experimental feature. Its API and behavior is subject to change in the future without prior
269-
notice.
270-
271-
</Tip>
272239

273240
### Scheduled uploads
274241

docs/source/en/package_reference/hf_api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ models = hf_api.list_models()
3131

3232
[[autodoc]] HfApi
3333

34-
[[autodoc]] plan_multi_commits
35-
3634
## API Dataclasses
3735

3836
### AccessRequest

docs/source/ko/package_reference/hf_api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ models = hf_api.list_models()
3131

3232
[[autodoc]] HfApi
3333

34-
[[autodoc]] plan_multi_commits
35-
3634
## API Dataclasses[[api-dataclasses]]
3735

3836
### AccessRequest[[huggingface_hub.hf_api.AccessRequest]]

src/huggingface_hub/__init__.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from typing import TYPE_CHECKING
4747

4848

49-
__version__ = "0.26.0.dev0"
49+
__version__ = "0.27.0.dev0"
5050

5151
# Alphabetical order of definitions is ensured in tests
5252
# WARNING: any comment added in this dictionary definition will be lost when
@@ -70,10 +70,6 @@
7070
"logout",
7171
"notebook_login",
7272
],
73-
"_multi_commits": [
74-
"MultiCommitException",
75-
"plan_multi_commits",
76-
],
7773
"_snapshot_download": [
7874
"snapshot_download",
7975
],
@@ -167,7 +163,6 @@
167163
"create_branch",
168164
"create_collection",
169165
"create_commit",
170-
"create_commits_on_pr",
171166
"create_discussion",
172167
"create_inference_endpoint",
173168
"create_pull_request",
@@ -601,10 +596,6 @@ def __dir__():
601596
logout, # noqa: F401
602597
notebook_login, # noqa: F401
603598
)
604-
from ._multi_commits import (
605-
MultiCommitException, # noqa: F401
606-
plan_multi_commits, # noqa: F401
607-
)
608599
from ._snapshot_download import snapshot_download # noqa: F401
609600
from ._space_api import (
610601
SpaceHardware, # noqa: F401
@@ -694,7 +685,6 @@ def __dir__():
694685
create_branch, # noqa: F401
695686
create_collection, # noqa: F401
696687
create_commit, # noqa: F401
697-
create_commits_on_pr, # noqa: F401
698688
create_discussion, # noqa: F401
699689
create_inference_endpoint, # noqa: F401
700690
create_pull_request, # noqa: F401

0 commit comments

Comments
 (0)