Skip to content

Commit 6bb395a

Browse files
Fix version of HF hub in ads (#857)
2 parents 9d2e65b + c21bdeb commit 6bb395a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

ads/aqua/model/model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,7 @@ def register(
771771
os.makedirs(local_dir, exist_ok=True)
772772
# Copy the model from the cache to destination
773773
snapshot_download(
774-
repo_id=model_name,
775-
local_dir=local_dir,
774+
repo_id=model_name, local_dir=local_dir, local_dir_use_symlinks=False
776775
)
777776
# Upload to object storage
778777
model_artifact_path = upload_folder(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ opctl = [
116116
"rich",
117117
"fire",
118118
"cachetools",
119-
"huggingface_hub"
119+
"huggingface_hub==0.22.2"
120120
]
121121
optuna = ["optuna==2.9.0", "oracle_ads[viz]"]
122122
spark = ["pyspark>=3.0.0"]

tests/unitary/with_extras/aqua/test_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ def test_import_verified_model(
577577
mock_snapshot_download.assert_called_with(
578578
repo_id=hf_model,
579579
local_dir=f"{str(tmpdir)}/{hf_model}",
580+
local_dir_use_symlinks=False,
580581
)
581582
mock_subprocess.assert_called_with(
582583
shlex.split(
@@ -779,6 +780,7 @@ def test_import_any_hf_model_custom_container(
779780
mock_snapshot_download.assert_called_with(
780781
repo_id=hf_model,
781782
local_dir=f"{str(tmpdir)}/{hf_model}",
783+
local_dir_use_symlinks=False,
782784
)
783785
mock_subprocess.assert_called_with(
784786
shlex.split(
@@ -894,6 +896,7 @@ def test_import_any_hf_model_smc_container(
894896
mock_snapshot_download.assert_called_with(
895897
repo_id=hf_model,
896898
local_dir=f"{str(tmpdir)}/{hf_model}",
899+
local_dir_use_symlinks=False,
897900
)
898901
mock_subprocess.assert_called_with(
899902
shlex.split(

0 commit comments

Comments
 (0)