Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/en/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1330,10 +1330,10 @@ Tag v1.0 created on bigcode/the-stack

### List tags

To list all tags for a repository, use the `-l` or `--list` option:
To list all tags for a repository, use the `list` (or `ls`) subcommand:

```bash
>>> hf repos tag create Wauplin/gradio-space-ci -l --repo-type space
>>> hf repos tag list Wauplin/gradio-space-ci --repo-type space
Tags for space Wauplin/gradio-space-ci:
0.2.2
0.2.1
Expand All @@ -1345,10 +1345,10 @@ Tags for space Wauplin/gradio-space-ci:

### Delete a tag

To delete a tag, use the `-d` or `--delete` option:
To delete a tag, use the `delete` subcommand:

```bash
>>> hf repos tag create -d Wauplin/my-cool-model v1.0
>>> hf repos tag delete Wauplin/my-cool-model v1.0
You are about to delete tag v1.0 on model Wauplin/my-cool-model
Proceed? [Y/n] y
Tag v1.0 deleted on Wauplin/my-cool-model
Expand Down
60 changes: 30 additions & 30 deletions docs/source/en/guides/inference.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/source/en/guides/manage-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ If you want to benefit from the symlink-based cache-system on a Windows machine,
either need to [activate Developer Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development)
or to run Python as an administrator.

If you want to proactively use the no-symlink cache mode (e.g. on a shared filesystem that doesn't handle symlinks
well), you can set the [`HF_HUB_DISABLE_SYMLINKS`](../package_reference/environment_variables#hfhubdisablesymlinks) environment variable to `1`. Files will be copied into `snapshots/`
directly instead of symlinking to `blobs/`.

When symlinks are not supported, a warning message is displayed to the user to alert
them they are using a degraded version of the cache-system. This warning can be disabled
by setting the `HF_HUB_DISABLE_SYMLINKS_WARNING` environment variable to true.
Expand Down
10 changes: 8 additions & 2 deletions docs/source/en/guides/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ Or via CLI:
>>> hf repos create lysandre/test-dataset --repo-type dataset
```

When you create a repository, you can set your repository visibility with the `private` parameter.
When you create a repository, you can set your repository visibility with the `visibility` parameter:

```py
>>> from huggingface_hub import create_repo
>>> create_repo("lysandre/test-private", private=True)
>>> create_repo("lysandre/test-private", visibility="private")
```

Or via CLI:
Expand All @@ -91,6 +91,12 @@ Specify the `repo_id` of the repository you want to delete:
>>> delete_repo(repo_id="lysandre/my-corrupted-dataset", repo_type="dataset")
```

Pass `missing_ok=True` to silently ignore the call if the repository doesn't exist:

```py
>>> delete_repo(repo_id="lysandre/my-corrupted-dataset", repo_type="dataset", missing_ok=True)
```

Or via CLI:

```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/source/en/guides/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ local debugging but is to keep in mind for later.

> [!WARNING]
> By default, the server is started at the end of your script. If you are running it in a notebook, you can start the
> server manually by calling `decorated_function.run()`. Since a unique server is used, you only have to start the server
> server manually by calling `decorated_function.launch()`. Since a unique server is used, you only have to start the server
> once even if you have multiple endpoints.

Expand Down Expand Up @@ -303,7 +303,7 @@ async def goodbye(payload: WebhookPayload):
return {"message": "goodbye"}

# 5. Start server (optional)
app.run()
app.launch()
```

1. We define a custom UI using Gradio blocks. This UI will be displayed on the landing page of the server.
Expand Down
1 change: 0 additions & 1 deletion docs/source/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pip install 'huggingface_hub[mcp,torch]'
```

Here is the list of optional dependencies in `huggingface_hub`:
- `cli`: provide a more convenient CLI interface for `huggingface_hub`.
- `fastai`, `torch`: dependencies to run framework-specific features.
- `dev`: dependencies to contribute to the lib. Includes `testing` (to run tests), `typing` (to run type checker) and `quality` (to run linters).

Expand Down
1 change: 0 additions & 1 deletion docs/source/en/package_reference/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ In order to standardize all environment variables within the Hugging Face ecosys
| `HUGGINGFACE_HUB_CACHE` | `HF_HUB_CACHE` |
| `HUGGINGFACE_ASSETS_CACHE` | `HF_ASSETS_CACHE` |
| `HUGGING_FACE_HUB_TOKEN` | `HF_TOKEN` |
| `HUGGINGFACE_HUB_VERBOSITY` | `HF_HUB_VERBOSITY` |

## From external tools

Expand Down
9 changes: 4 additions & 5 deletions docs/source/en/package_reference/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,18 @@ Unlike the synchronous client, the lifecycle of the async client is not managed
## Handle HTTP errors

`huggingface_hub` defines its own HTTP errors to refine the `HTTPError` raised by
`requests` with additional information sent back by the server.
`httpx` with additional information sent back by the server.

### Raise for status

[`~utils.hf_raise_for_status`] is meant to be the central method to "raise for status" from any
request made to the Hub. It wraps the base `requests.raise_for_status` to provide
request made to the Hub. It wraps the base `httpx.Response.raise_for_status` to provide
additional information. Any `HTTPError` thrown is converted into a `HfHubHTTPError`.

```py
import requests
from huggingface_hub.utils import hf_raise_for_status, HfHubHTTPError
from huggingface_hub.utils import get_session, hf_raise_for_status, HfHubHTTPError

response = requests.post(...)
response = get_session().post(...)
try:
hf_raise_for_status(response)
except HfHubHTTPError as e:
Expand Down
1 change: 0 additions & 1 deletion docs/source/ko/package_reference/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Hugging Face 생태계의 모든 환경 변수를 표준화하기 위해 일부
| `HUGGINGFACE_HUB_CACHE` | `HF_HUB_CACHE` |
| `HUGGINGFACE_ASSETS_CACHE` | `HF_ASSETS_CACHE` |
| `HUGGING_FACE_HUB_TOKEN` | `HF_TOKEN` |
| `HUGGINGFACE_HUB_VERBOSITY` | `HF_HUB_VERBOSITY` |

## 외부 도구[[from-external-tools]]

Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/utils/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ def set_client_factory(client_factory: CLIENT_FACTORY_T) -> None:
"""
Set the HTTP client factory to be used by `huggingface_hub`.
The client factory is a method that returns a `httpx.Client` object. On the first call to [`get_client`] the client factory
The client factory is a method that returns a `httpx.Client` object. On the first call to [`get_session`] the client factory
will be used to create a new `httpx.Client` object that will be shared between all calls made by `huggingface_hub`.
This can be useful if you are running your scripts in a specific environment requiring custom configuration (e.g. custom proxy or certifications).
Use [`get_client`] to get a correctly configured `httpx.Client`.
Use [`get_session`] to get a correctly configured `httpx.Client`.
"""
global _GLOBAL_CLIENT_FACTORY
with _CLIENT_LOCK:
Expand Down
Loading