huggingface-hub 0.24.3__py3-none-any.whl → 0.24.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of huggingface-hub might be problematic. Click here for more details.
- huggingface_hub/__init__.py +1 -1
- huggingface_hub/file_download.py +20 -1
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/METADATA +1 -1
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/RECORD +8 -8
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/LICENSE +0 -0
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/WHEEL +0 -0
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/entry_points.txt +0 -0
- {huggingface_hub-0.24.3.dist-info → huggingface_hub-0.24.4.dist-info}/top_level.txt +0 -0
huggingface_hub/__init__.py
CHANGED
huggingface_hub/file_download.py
CHANGED
|
@@ -1951,6 +1951,11 @@ def _chmod_and_move(src: Path, dst: Path) -> None:
|
|
|
1951
1951
|
tmp_file.touch()
|
|
1952
1952
|
cache_dir_mode = Path(tmp_file).stat().st_mode
|
|
1953
1953
|
os.chmod(str(src), stat.S_IMODE(cache_dir_mode))
|
|
1954
|
+
except OSError as e:
|
|
1955
|
+
logger.warning(
|
|
1956
|
+
f"Could not set the permissions on the file '{src}'. "
|
|
1957
|
+
f"Error: {e}.\nContinuing without setting permissions."
|
|
1958
|
+
)
|
|
1954
1959
|
finally:
|
|
1955
1960
|
try:
|
|
1956
1961
|
tmp_file.unlink()
|
|
@@ -1959,7 +1964,21 @@ def _chmod_and_move(src: Path, dst: Path) -> None:
|
|
|
1959
1964
|
# See https://github.com/huggingface/huggingface_hub/issues/2359
|
|
1960
1965
|
pass
|
|
1961
1966
|
|
|
1962
|
-
shutil.move(str(src), str(dst))
|
|
1967
|
+
shutil.move(str(src), str(dst), copy_function=_copy_no_matter_what)
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
def _copy_no_matter_what(src: str, dst: str) -> None:
|
|
1971
|
+
"""Copy file from src to dst.
|
|
1972
|
+
|
|
1973
|
+
If `shutil.copy2` fails, fallback to `shutil.copyfile`.
|
|
1974
|
+
"""
|
|
1975
|
+
try:
|
|
1976
|
+
# Copy file with metadata and permission
|
|
1977
|
+
# Can fail e.g. if dst is an S3 mount
|
|
1978
|
+
shutil.copy2(src, dst)
|
|
1979
|
+
except OSError:
|
|
1980
|
+
# Copy only file content
|
|
1981
|
+
shutil.copyfile(src, dst)
|
|
1963
1982
|
|
|
1964
1983
|
|
|
1965
1984
|
def _get_pointer_path(storage_folder: str, revision: str, relative_filename: str) -> str:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huggingface-hub
|
|
3
|
-
Version: 0.24.
|
|
3
|
+
Version: 0.24.4
|
|
4
4
|
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
|
|
5
5
|
Home-page: https://github.com/huggingface/huggingface_hub
|
|
6
6
|
Author: Hugging Face, Inc.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
huggingface_hub/__init__.py,sha256=
|
|
1
|
+
huggingface_hub/__init__.py,sha256=iZNFPk2xzqsESO1Lm7c9_P8a2d8YAqT5RJDTC7pSkd8,33897
|
|
2
2
|
huggingface_hub/_commit_api.py,sha256=Yj1ft_WbsnqjSbiYHgdqGmLTF6BTA4E8kAGYW89t2sQ,31057
|
|
3
3
|
huggingface_hub/_commit_scheduler.py,sha256=nlJS_vnLb8i92NLrRwJX8Mg9QZ7f3kfLbLlQuEd5YjU,13647
|
|
4
4
|
huggingface_hub/_inference_endpoints.py,sha256=th6vlJ2vUg314x7uMLzQHfy4AuX5mFlJqNobVIz5yOY,15944
|
|
@@ -14,7 +14,7 @@ huggingface_hub/community.py,sha256=SBaOfI-3atCzRbO0gDS8BYxctbdvD4G0X6D0GfY8Fgc,
|
|
|
14
14
|
huggingface_hub/constants.py,sha256=BG3n2gl4JbxMw_JRvNTFyMcNnZIPzvT3KXSH-jm2J08,8005
|
|
15
15
|
huggingface_hub/errors.py,sha256=IM0lNbExLzaYEs0HrrPvY4-kyj6DiP2Szu7Jy9slHOE,2083
|
|
16
16
|
huggingface_hub/fastai_utils.py,sha256=5I7zAfgHJU_mZnxnf9wgWTHrCRu_EAV8VTangDVfE_o,16676
|
|
17
|
-
huggingface_hub/file_download.py,sha256=
|
|
17
|
+
huggingface_hub/file_download.py,sha256=jbyp_B22xOknzy6FjlLly8i3we3UqVK39DWmUtxKPNI,84854
|
|
18
18
|
huggingface_hub/hf_api.py,sha256=2tcE3gCnASv2UEVst_oMzTZiKmjlTraV7bP8ujbDmLQ,406710
|
|
19
19
|
huggingface_hub/hf_file_system.py,sha256=HlYbWFhMrPWNqGUQfQrZR6H70QK0PgsxRvO4FantCNc,39160
|
|
20
20
|
huggingface_hub/hub_mixin.py,sha256=bm5hZGeOHBSUBfiAXJv8cU05nAZr65TxnkUJLWLwAEg,37308
|
|
@@ -107,9 +107,9 @@ huggingface_hub/utils/insecure_hashlib.py,sha256=OjxlvtSQHpbLp9PWSrXBDJ0wHjxCBU-
|
|
|
107
107
|
huggingface_hub/utils/logging.py,sha256=Cp03s0uEl3kDM9XHQW9a8GAoExODQ-e7kEtgMt-_To8,4728
|
|
108
108
|
huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
|
|
109
109
|
huggingface_hub/utils/tqdm.py,sha256=jQiVYwRG78HK4_54u0vTtz6Kt9IMGiHy3ixbIn3h2TU,9368
|
|
110
|
-
huggingface_hub-0.24.
|
|
111
|
-
huggingface_hub-0.24.
|
|
112
|
-
huggingface_hub-0.24.
|
|
113
|
-
huggingface_hub-0.24.
|
|
114
|
-
huggingface_hub-0.24.
|
|
115
|
-
huggingface_hub-0.24.
|
|
110
|
+
huggingface_hub-0.24.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
111
|
+
huggingface_hub-0.24.4.dist-info/METADATA,sha256=uxQamTAa7pYn6rfUBoGdbUfQuWW0d2rBEASQI0qbovI,13183
|
|
112
|
+
huggingface_hub-0.24.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
113
|
+
huggingface_hub-0.24.4.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
|
|
114
|
+
huggingface_hub-0.24.4.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
|
|
115
|
+
huggingface_hub-0.24.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|