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
7 changes: 2 additions & 5 deletions docs/source/en/package_reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,13 @@ Deploy an Inference Endpoint from the Model Catalog.
**Usage**:

```console
$ hf endpoints catalog deploy [OPTIONS] NAME
$ hf endpoints catalog deploy [OPTIONS]
```

**Arguments**:

* `NAME`: Endpoint name. [required]

**Options**:

* `--repo TEXT`: The name of the model repository associated with the Inference Endpoint (e.g. 'openai/gpt-oss-120b'). [required]
* `--name TEXT`: Endpoint name.
* `--namespace TEXT`: The namespace associated with the Inference Endpoint. Defaults to the current user's namespace.
* `--token TEXT`: A User Access Token generated from https://huggingface.co/settings/tokens.
* `--help`: Show this message and exit.
Expand Down
6 changes: 5 additions & 1 deletion src/huggingface_hub/cli/inference_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
str,
typer.Argument(help="Endpoint name."),
]
NameOpt = Annotated[
Optional[str],
typer.Option(help="Endpoint name."),
]

NamespaceOpt = Annotated[
Optional[str],
Expand Down Expand Up @@ -130,13 +134,13 @@ def deploy(

@catalog_app.command(name="deploy")
def deploy_from_catalog(
name: NameArg,
repo: Annotated[
str,
typer.Option(
help="The name of the model repository associated with the Inference Endpoint (e.g. 'openai/gpt-oss-120b').",
),
],
name: NameOpt = None,
namespace: NamespaceOpt = None,
token: TokenOpt = None,
) -> None:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,6 @@ def test_deploy_from_catalog(self, runner: CliRunner) -> None:
"endpoints",
"catalog",
"deploy",
"catalog-endpoint",
"--repo",
"catalog/model",
],
Expand All @@ -1353,7 +1352,7 @@ def test_deploy_from_catalog(self, runner: CliRunner) -> None:
api_cls.assert_called_once_with(token=None)
api.create_inference_endpoint_from_catalog.assert_called_once_with(
repo_id="catalog/model",
name="catalog-endpoint",
name=None,
namespace=None,
token=None,
)
Expand Down
Loading