Skip to content

Commit 1611e8d

Browse files
committed
Merge remote-tracking branch 'origin/main' into verify-checksum-cli
2 parents c92f346 + 39ebbc0 commit 1611e8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1672
-740
lines changed

.github/workflows/python-quality.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- run: .venv/bin/python utils/check_static_imports.py
4242
- run: .venv/bin/python utils/check_all_variable.py
4343
- run: .venv/bin/python utils/generate_async_inference_client.py
44+
- run: .venv/bin/python utils/generate_cli_reference.py --verbose
4445
- run: .venv/bin/python utils/generate_inference_types.py
4546
- run: .venv/bin/python utils/check_task_parameters.py
4647
- run: uvx ty check src

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ quality:
1111
python utils/check_static_imports.py
1212
python utils/check_all_variable.py
1313
python utils/generate_async_inference_client.py
14+
python utils/generate_cli_reference.py
1415

1516
ty check src
1617

@@ -20,6 +21,7 @@ style:
2021
python utils/check_static_imports.py --update
2122
python utils/check_all_variable.py --update
2223
python utils/generate_async_inference_client.py --update
24+
python utils/generate_cli_reference.py --update
2325

2426
inference_check:
2527
python utils/generate_inference_types.py

docs/source/en/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
title: Environment variables
5959
- local: package_reference/hf_api
6060
title: Hugging Face Hub API
61+
- local: package_reference/cli
62+
title: CLI
6163
- local: package_reference/file_download
6264
title: Downloading files
6365
- local: package_reference/mixins

docs/source/en/concepts/migration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ The migration from `requests` to `httpx` brings several key improvements that en
4545

4646
The transition to `httpx` positions `huggingface_hub` with a modern, efficient, and maintainable HTTP backend. While most users should experience seamless operation, the underlying improvements provide better performance and reliability for all Hub interactions.
4747

48+
## `hf_transfer`
49+
50+
Now that all repositories on the Hub are Xet-enabled and that `hf_xet` is the default way to download/upload files, we've removed support for the `hf_transfer` optional package. The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is therefore ignored. Use [`HF_XET_HIGH_PERFORMANCE`](../package_reference/environment_variables.md) instead.
51+
4852
## `Repository` class
4953

5054
The `Repository` class has been removed in v1.0. It was a thin wrapper around the `git` CLI for managing repositories. You can still use `git` directly in the terminal, but the recommended approach is to use the HTTP-based API in the `huggingface_hub` library for a smoother experience, especially when dealing with large files.

docs/source/en/guides/cli.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ rendered properly in your Markdown viewer.
66

77
The `huggingface_hub` Python package comes with a built-in CLI called `hf`. This tool allows you to interact with the Hugging Face Hub directly from a terminal. For example, you can login to your account, create a repository, upload and download files, etc. It also comes with handy features to configure your machine or manage your cache. In this guide, we will have a look at the main features of the CLI and how to use them.
88

9+
> [!TIP]
10+
> This guide covers the most important features of the `hf` CLI.
11+
> For a complete reference of all commands and options, see the [CLI reference](../package_reference/cli.md).
12+
913
## Getting started
1014

1115
First of all, let's install the CLI:
@@ -15,7 +19,7 @@ First of all, let's install the CLI:
1519
```
1620

1721
> [!TIP]
18-
> The CLI ships with the core `huggingface_hub` package, so there is no longer a `[cli]` extra to install.
22+
> The CLI ships with the core `huggingface_hub` package.
1923
2024
Alternatively, you can install the `hf` CLI with a single command:
2125

@@ -778,39 +782,36 @@ The `hf env` command prints details about your machine setup. This is useful whe
778782

779783
Copy-and-paste the text below in your GitHub issue.
780784

781-
- huggingface_hub version: 0.19.0.dev0
782-
- Platform: Linux-6.2.0-36-generic-x86_64-with-glibc2.35
783-
- Python version: 3.10.12
785+
- huggingface_hub version: 1.0.0.rc6
786+
- Platform: Linux-6.8.0-85-generic-x86_64-with-glibc2.35
787+
- Python version: 3.11.14
784788
- Running in iPython ?: No
785789
- Running in notebook ?: No
786790
- Running in Google Colab ?: No
791+
- Running in Google Colab Enterprise ?: No
787792
- Token path ?: /home/wauplin/.cache/huggingface/token
788793
- Has saved token ?: True
789794
- Who am I ?: Wauplin
790795
- Configured git credential helpers: store
791-
- FastAI: N/A
792-
- Torch: 1.12.1
793-
- Jinja2: 3.1.2
794-
- Graphviz: 0.20.1
795-
- Pydot: 1.4.2
796-
- Pillow: 9.2.0
797-
- hf_transfer: 0.1.3
798-
- gradio: 4.0.2
799-
- tensorboard: 2.6
800-
- numpy: 1.23.2
801-
- pydantic: 2.4.2
802-
- aiohttp: 3.8.4
796+
- Installation method: unknown
797+
- Torch: N/A
798+
- httpx: 0.28.1
799+
- hf_xet: 1.1.10
800+
- gradio: 5.41.1
801+
- tensorboard: N/A
802+
- pydantic: 2.11.7
803803
- ENDPOINT: https://huggingface.co
804804
- HF_HUB_CACHE: /home/wauplin/.cache/huggingface/hub
805805
- HF_ASSETS_CACHE: /home/wauplin/.cache/huggingface/assets
806806
- HF_TOKEN_PATH: /home/wauplin/.cache/huggingface/token
807+
- HF_STORED_TOKENS_PATH: /home/wauplin/.cache/huggingface/stored_tokens
807808
- HF_HUB_OFFLINE: False
808809
- HF_HUB_DISABLE_TELEMETRY: False
809810
- HF_HUB_DISABLE_PROGRESS_BARS: None
810811
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
811812
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
812813
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
813-
- HF_HUB_ENABLE_HF_TRANSFER: False
814+
- HF_HUB_DISABLE_XET: False
814815
- HF_HUB_ETAG_TIMEOUT: 10
815816
- HF_HUB_DOWNLOAD_TIMEOUT: 10
816817
```

docs/source/en/guides/download.md

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ Finally, you can also make a dry-run programmatically by passing `dry_run=True`
243243

244244
## Faster downloads
245245

246-
There are two options to speed up downloads. Both involve installing a Python package written in Rust.
247-
248-
* `hf_xet` is newer and uses the Xet storage backend for upload/download. Xet storage is the [default for all new Hub users and organizations](https://huggingface.co/changelog/xet-default-for-new-users), and is in the process of being rolled out to all users. If you don't have access, join the [waitlist](https://huggingface.co/join/xet) to make Xet the default for all your repositories!
249-
* `hf_transfer` is a power-tool to download and upload to our LFS storage backend (note: this is less future-proof than Xet). It is thoroughly tested and has been in production for a long time, but it has some limitations.
250-
251-
### hf_xet
252-
253246
Take advantage of faster downloads through `hf_xet`, the Python binding to the [`xet-core`](https://github.com/huggingface/xet-core) library that enables
254247
chunk-based deduplication for faster downloads and uploads. `hf_xet` integrates seamlessly with `huggingface_hub`, but uses the Rust `xet-core` library and Xet storage instead of LFS.
255248

@@ -263,23 +256,6 @@ pip install -U "huggingface_hub"
263256

264257
As of `huggingface_hub` 0.32.0, this will also install `hf_xet`.
265258

266-
Note: `hf_xet` will only be utilized when the files being downloaded are being stored with Xet Storage.
267-
268259
All other `huggingface_hub` APIs will continue to work without any modification. To learn more about the benefits of Xet storage and `hf_xet`, refer to this [section](https://huggingface.co/docs/hub/storage-backends).
269260

270-
### hf_transfer
271-
272-
If you are running on a machine with high bandwidth,
273-
you can increase your download speed with [`hf_transfer`](https://github.com/huggingface/hf_transfer),
274-
a Rust-based library developed to speed up file transfers with the Hub.
275-
To enable it:
276-
277-
1. Specify the `hf_transfer` extra when installing `huggingface_hub`
278-
(e.g. `pip install huggingface_hub[hf_transfer]`).
279-
2. Set `HF_HUB_ENABLE_HF_TRANSFER=1` as an environment variable.
280-
281-
> [!WARNING]
282-
> `hf_transfer` is a power user tool!
283-
> It is tested and production-ready,
284-
> but it lacks user-friendly features like advanced error handling or proxies.
285-
> For more details, please take a look at this [section](https://huggingface.co/docs/huggingface_hub/hf_transfer).
261+
Note: `hf_transfer` was formerly used with the LFS storage backend and is now deprecated; use `hf_xet` instead.

0 commit comments

Comments
 (0)