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
2 changes: 1 addition & 1 deletion src/huggingface_hub/cli/_cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_hf_api(token: Optional[str] = None) -> "HfApi":
# Import here to avoid circular import
from huggingface_hub.hf_api import HfApi

return HfApi(token=token, library_name="hf", library_version=__version__)
return HfApi(token=token, library_name="huggingface-cli", library_version=__version__)


#### TYPER UTILS
Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/cli/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def run_download() -> Union[str, DryRunFileInfo, list[DryRunFileInfo]]:
force_download=force_download,
token=token,
local_dir=local_dir,
library_name="hf",
library_name="huggingface-cli",
dry_run=dry_run,
)

Expand All @@ -156,7 +156,7 @@ def run_download() -> Union[str, DryRunFileInfo, list[DryRunFileInfo]]:
cache_dir=cache_dir,
token=token,
local_dir=local_dir,
library_name="hf",
library_name="huggingface-cli",
max_workers=max_workers,
dry_run=dry_run,
)
Expand Down
10 changes: 5 additions & 5 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def test_download_basic(self, runner: CliRunner) -> None:
assert kwargs["cache_dir"] is None
assert kwargs["local_dir"] is None
assert kwargs["token"] is None
assert kwargs["library_name"] == "hf"
assert kwargs["library_name"] == "huggingface-cli"
assert kwargs["max_workers"] == 8

def test_download_with_all_options(self, runner: CliRunner) -> None:
Expand Down Expand Up @@ -707,7 +707,7 @@ def test_download_with_all_options(self, runner: CliRunner) -> None:
assert kwargs["cache_dir"] == "/tmp"
assert kwargs["local_dir"] == "."
assert kwargs["token"] == "my-token"
assert kwargs["library_name"] == "hf"
assert kwargs["library_name"] == "huggingface-cli"
assert kwargs["max_workers"] == 4


Expand All @@ -734,7 +734,7 @@ def test_download_file_from_revision(self, mock_download: Mock, mock_snapshot: M
force_download=False,
token=None,
local_dir=None,
library_name="hf",
library_name="huggingface-cli",
dry_run=False,
)
mock_snapshot.assert_not_called()
Expand Down Expand Up @@ -764,7 +764,7 @@ def test_download_multiple_files(self, mock_download: Mock, mock_snapshot: Mock)
cache_dir=None,
token=None,
local_dir=None,
library_name="hf",
library_name="huggingface-cli",
max_workers=4,
dry_run=False,
)
Expand All @@ -791,7 +791,7 @@ def test_download_with_patterns(self, mock_snapshot: Mock) -> None:
cache_dir=None,
token=None,
local_dir=None,
library_name="hf",
library_name="huggingface-cli",
max_workers=8,
dry_run=False,
)
Expand Down
Loading