Skip to content

Commit ebf055e

Browse files
authored
Fix some outdated docs (#3495)
1 parent 7263e47 commit ebf055e

File tree

6 files changed

+7
-36
lines changed

6 files changed

+7
-36
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ pip install huggingface_hub
6363

6464
If you prefer, you can also install it with [conda](https://huggingface.co/docs/huggingface_hub/en/installation#install-with-conda).
6565

66-
In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want have a complete experience for Inference, run:
66+
In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want to use the MCP module, run:
6767

6868
```bash
69-
pip install "huggingface_hub[inference]"
69+
pip install "huggingface_hub[mcp]"
7070
```
7171

7272
To learn more installation and optional dependencies, check out the [installation guide](https://huggingface.co/docs/huggingface_hub/en/installation).

docs/source/en/guides/inference.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,7 @@ print(completion.choices[0].message)
389389
390390
## Async client
391391

392-
An async version of the client is also provided, based on `asyncio` and `aiohttp`. You can either install `aiohttp`
393-
directly or use the `[inference]` extra:
394-
395-
```sh
396-
pip install --upgrade huggingface_hub[inference]
397-
# or
398-
# pip install aiohttp
399-
```
400-
401-
After installation all async API endpoints are available via [`AsyncInferenceClient`]. Its initialization and APIs are
402-
strictly the same as the sync-only version.
392+
An async version of the client is also provided, based on `asyncio` and `httpx`. All async API endpoints are available via [`AsyncInferenceClient`]. Its initialization and APIs are strictly the same as the sync-only version.
403393

404394
```py
405395
# Code must be run in an asyncio concurrent context.

docs/source/en/package_reference/inference_client.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,7 @@ for more information on how to use it.
2020

2121
## Async Inference Client
2222

23-
An async version of the client is also provided, based on `asyncio` and `aiohttp`.
24-
To use it, you can either install `aiohttp` directly or use the `[inference]` extra:
25-
26-
```sh
27-
pip install --upgrade huggingface_hub[inference]
28-
# or
29-
# pip install aiohttp
30-
```
23+
An async version of the client is also provided, based on `asyncio` and `httpx`.
3124

3225
[[autodoc]] AsyncInferenceClient
3326

i18n/README_fr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ pip install huggingface_hub
6262

6363
Si vous préférez, vous pouvez aussi l’installer avec [conda](https://huggingface.co/docs/huggingface_hub/en/installation#install-with-conda).
6464

65-
Afin de garder le paquet minimal par défaut, `huggingface_hub` vient avec des dépendances optionnelles utiles pour certains cas d’usage. Par exemple, si vous voulez faire de l’inférence, exécutez :
65+
Afin de garder le paquet minimal par défaut, `huggingface_hub` vient avec des dépendances optionnelles utiles pour certains cas d’usage. Par exemple, si vous voulez utiliser le module MCP, exécutez :
6666

6767
```bash
68-
pip install "huggingface_hub[inference]"
68+
pip install "huggingface_hub[mcp]"
6969
```
7070

7171
Pour en savoir plus sur l'installation et les dépendances optionnelles, consultez le [guide d’installation](https://huggingface.co/docs/huggingface_hub/en/installation).

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ def get_version() -> str:
4747

4848
extras["hf_xet"] = ["hf-xet>=1.1.3,<2.0.0"]
4949

50-
extras["mcp"] = [
51-
"mcp>=1.8.0",
52-
"typer",
53-
]
50+
extras["mcp"] = ["mcp>=1.8.0"]
5451

5552
extras["testing"] = (
5653
extras["oauth"]

utils/generate_async_inference_client.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,6 @@ def _add_imports(code: str) -> str:
150150
flags=re.DOTALL,
151151
)
152152

153-
# type-checking imports
154-
code = re.sub(
155-
r"(\nif TYPE_CHECKING:\n)",
156-
repl=r"\1 from aiohttp import ClientResponse, ClientSession\n",
157-
string=code,
158-
count=1,
159-
flags=re.DOTALL,
160-
)
161-
162153
return code
163154

164155

0 commit comments

Comments
 (0)