Skip to content

Commit fefad03

Browse files
authored
Merge branch 'DeepLabCut:main' into main
2 parents 8e992a3 + f48666f commit fefad03

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

dlclibrary/dlcmodelzoo/modelzoo_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _loadmodelnames():
3838
return YAML().load(file)
3939

4040

41-
def download_hugginface_model(modelname, target_dir=".", removeHFfolder=True):
41+
def download_huggingface_model(modelname, target_dir=".", removeHFfolder=True):
4242
"""
4343
Downloads a DeepLabCut Model Zoo Project from Hugging Face
4444

tests/test_modeldownload.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
import pytest
1212

1313

14-
def test_catdownload():
14+
def test_catdownload(tmp_path_factory):
1515
# TODO: just download the lightweight stuff..
1616
import dlclibrary, os
1717

18-
os.mkdir("cat")
19-
dlclibrary.download_hugginface_model("full_cat", "cat")
18+
folder = tmp_path_factory.mktemp("cat")
19+
dlclibrary.download_huggingface_model("full_cat", str(folder))
2020

21-
assert os.path.exists("cat/pose_cfg.yaml")
22-
assert os.path.exists("cat/snapshot-75000.meta")
23-
24-
import shutil
25-
26-
shutil.rmtree("cat")
21+
assert os.path.exists(folder / "pose_cfg.yaml")
22+
assert os.path.exists(folder / "snapshot-75000.meta")

0 commit comments

Comments
 (0)