Skip to content

Commit a726b30

Browse files
authored
fix(hub): import create_repo from huggingface_hub (transformers dropped the passthrough) (#2917)
Latest transformers removed create_repo from transformers.utils.hub, so `import gptqmodel` raises AttributeError. transformers.utils.hub.create_repo was always a re-export of huggingface_hub.create_repo, so import it from the canonical source. The _HF_API-bound helpers stay on transformers hub. Fixes #2916
1 parent 9fd6c8d commit a726b30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gptqmodel/utils/hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
from __future__ import annotations
77

8+
from huggingface_hub import create_repo
89
from transformers.utils import hub as transformers_hub
910
from transformers.utils import logging as transformers_logging
1011

1112

1213
cached_file = transformers_hub.cached_file
13-
create_repo = transformers_hub.create_repo
1414
has_file = transformers_hub.has_file
1515
hf_hub_download = transformers_hub.hf_hub_download
1616
list_repo_tree = transformers_hub.list_repo_tree

0 commit comments

Comments
 (0)