hfutils 0.2.1__tar.gz → 0.2.2__tar.gz

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.
Files changed (51) hide show
  1. {hfutils-0.2.1/hfutils.egg-info → hfutils-0.2.2}/PKG-INFO +1 -1
  2. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/config/meta.py +1 -1
  3. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/index/fetch.py +11 -9
  4. {hfutils-0.2.1 → hfutils-0.2.2/hfutils.egg-info}/PKG-INFO +1 -1
  5. {hfutils-0.2.1 → hfutils-0.2.2}/LICENSE +0 -0
  6. {hfutils-0.2.1 → hfutils-0.2.2}/MANIFEST.in +0 -0
  7. {hfutils-0.2.1 → hfutils-0.2.2}/README.md +0 -0
  8. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/__init__.py +0 -0
  9. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/__init__.py +0 -0
  10. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/base.py +0 -0
  11. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/rar.py +0 -0
  12. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/sevenz.py +0 -0
  13. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/tar.py +0 -0
  14. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/archive/zip.py +0 -0
  15. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/config/__init__.py +0 -0
  16. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/__init__.py +0 -0
  17. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/base.py +0 -0
  18. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/cli.py +0 -0
  19. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/dispatch.py +0 -0
  20. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/download.py +0 -0
  21. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/ls.py +0 -0
  22. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/entry/upload.py +0 -0
  23. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/index/__init__.py +0 -0
  24. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/index/hash.py +0 -0
  25. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/index/make.py +0 -0
  26. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/index/validate.py +0 -0
  27. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/operate/__init__.py +0 -0
  28. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/operate/base.py +0 -0
  29. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/operate/download.py +0 -0
  30. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/operate/upload.py +0 -0
  31. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/operate/validate.py +0 -0
  32. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/__init__.py +0 -0
  33. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/binary.py +0 -0
  34. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/download.py +0 -0
  35. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/temp.py +0 -0
  36. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/tqdm_.py +0 -0
  37. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils/utils/walk.py +0 -0
  38. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils.egg-info/SOURCES.txt +0 -0
  39. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils.egg-info/dependency_links.txt +0 -0
  40. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils.egg-info/entry_points.txt +0 -0
  41. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils.egg-info/requires.txt +0 -0
  42. {hfutils-0.2.1 → hfutils-0.2.2}/hfutils.egg-info/top_level.txt +0 -0
  43. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-7z.txt +0 -0
  44. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-build.txt +0 -0
  45. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-doc.txt +0 -0
  46. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-rar.txt +0 -0
  47. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-test.txt +0 -0
  48. {hfutils-0.2.1 → hfutils-0.2.2}/requirements-transfer.txt +0 -0
  49. {hfutils-0.2.1 → hfutils-0.2.2}/requirements.txt +0 -0
  50. {hfutils-0.2.1 → hfutils-0.2.2}/setup.cfg +0 -0
  51. {hfutils-0.2.1 → hfutils-0.2.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hfutils
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Useful utilities for huggingface
5
5
  Home-page: https://github.com/deepghs/hfutils
6
6
  Author: narugo1992
@@ -7,7 +7,7 @@ Overview:
7
7
  __TITLE__ = 'hfutils'
8
8
 
9
9
  #: Version of this project.
10
- __VERSION__ = '0.2.1'
10
+ __VERSION__ = '0.2.2'
11
11
 
12
12
  #: Short description of the project, will be included in ``setup.py``.
13
13
  __DESCRIPTION__ = 'Useful utilities for huggingface'
@@ -240,6 +240,7 @@ def hf_tar_file_download(repo_id: str, archive_in_repo: str, file_in_archive: st
240
240
  f'in {repo_type}s/{repo_id}@{revision}/{archive_in_repo}.')
241
241
 
242
242
  info = files[_n_path(file_in_archive)]
243
+
243
244
  url_to_download = hf_hub_url(repo_id, archive_in_repo, repo_type=repo_type, revision=revision, endpoint=endpoint)
244
245
  headers = build_hf_headers(
245
246
  token=hf_token,
@@ -256,15 +257,16 @@ def hf_tar_file_download(repo_id: str, archive_in_repo: str, file_in_archive: st
256
257
  os.makedirs(os.path.dirname(local_file), exist_ok=True)
257
258
  try:
258
259
  with open(local_file, 'wb') as f:
259
- http_get(
260
- url_to_download,
261
- f,
262
- proxies=proxies,
263
- resume_size=0,
264
- headers=headers,
265
- expected_size=info['size'],
266
- displayed_filename=file_in_archive,
267
- )
260
+ if info['size'] > 0:
261
+ http_get(
262
+ url_to_download,
263
+ f,
264
+ proxies=proxies,
265
+ resume_size=0,
266
+ headers=headers,
267
+ expected_size=info['size'],
268
+ displayed_filename=file_in_archive,
269
+ )
268
270
 
269
271
  if os.path.getsize(local_file) != info['size']:
270
272
  raise ArchiveStandaloneFileIncompleteDownload(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hfutils
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Useful utilities for huggingface
5
5
  Home-page: https://github.com/deepghs/hfutils
6
6
  Author: narugo1992
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes