atomgit 1.0.4__tar.gz → 1.0.5__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.
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomgit
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: AtomGit模型文件上传下载CLI工具
5
5
  Home-page: https://atomgit.com/gitcode-ai/atomgit_cli
6
6
  Author: AtomGit CLI Team
@@ -29,8 +29,8 @@ Requires-Dist: requests>=2.31.0
29
29
  Requires-Dist: tqdm>=4.66.1
30
30
  Requires-Dist: colorama>=0.4.6
31
31
  Requires-Dist: tabulate>=0.9.0
32
- Requires-Dist: huggingface-hub>=0.20.0
33
- Requires-Dist: datasets>=2.16.0
32
+ Requires-Dist: huggingface-hub==1.1.7
33
+ Requires-Dist: datasets==4.4.1
34
34
  Dynamic: author
35
35
  Dynamic: author-email
36
36
  Dynamic: classifier
@@ -8,7 +8,7 @@ AtomGit CLI - 基于Transformers和Hugging Face Hub的模型文件上传下载
8
8
  支持模型和数据集的上传、下载等操作。
9
9
  """
10
10
 
11
- __version__ = '1.0.4'
11
+ __version__ = '1.0.5'
12
12
  __author__ = 'AtomGit CLI Team'
13
13
  __description__ = 'AtomGit模型文件上传下载CLI工具'
14
14
 
@@ -7,6 +7,8 @@ import urllib.error
7
7
 
8
8
  # 设置Hugging Face Hub的API端点为AtomGit
9
9
  os.environ["HF_ENDPOINT"] = "https://hub.atomgit.com"
10
+ # 禁用Xet协议,避免 xet-write-token 请求
11
+ os.environ["HF_HUB_DISABLE_XET"] = "1"
10
12
  # 设置缓存目录
11
13
  cache_dir = os.path.expanduser("~/.cache/atomgit")
12
14
  os.makedirs(cache_dir, exist_ok=True)
@@ -151,12 +153,13 @@ class HuggingFaceAPI:
151
153
  # 使用 Monkey Patch 方式临时修改 huggingface_hub 的默认超时配置
152
154
  commit_message = message or "Upload folder using atomgit client"
153
155
  hf_constants.DEFAULT_REQUEST_TIMEOUT = upload_timeout
154
- upload_folder(
156
+ upload_kwargs = dict(
155
157
  repo_id=repo_id,
156
158
  folder_path=str(temp_dir),
157
159
  token=credentials['token'],
158
- commit_message=commit_message
160
+ commit_message=commit_message,
159
161
  )
162
+ upload_folder(**upload_kwargs)
160
163
 
161
164
  return True
162
165
  finally:
@@ -185,12 +188,13 @@ class HuggingFaceAPI:
185
188
  # 使用 Monkey Patch 方式临时修改 huggingface_hub 的默认超时配置
186
189
  commit_message = message or "Upload folder using atomgit client"
187
190
  hf_constants.DEFAULT_REQUEST_TIMEOUT = upload_timeout
188
- upload_folder(
191
+ upload_kwargs = dict(
189
192
  repo_id=repo_id,
190
193
  folder_path=str(dir_path),
191
194
  token=credentials['token'],
192
- commit_message=commit_message
195
+ commit_message=commit_message,
193
196
  )
197
+ upload_folder(**upload_kwargs)
194
198
 
195
199
  return True
196
200
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomgit
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: AtomGit模型文件上传下载CLI工具
5
5
  Home-page: https://atomgit.com/gitcode-ai/atomgit_cli
6
6
  Author: AtomGit CLI Team
@@ -29,8 +29,8 @@ Requires-Dist: requests>=2.31.0
29
29
  Requires-Dist: tqdm>=4.66.1
30
30
  Requires-Dist: colorama>=0.4.6
31
31
  Requires-Dist: tabulate>=0.9.0
32
- Requires-Dist: huggingface-hub>=0.20.0
33
- Requires-Dist: datasets>=2.16.0
32
+ Requires-Dist: huggingface-hub==1.1.7
33
+ Requires-Dist: datasets==4.4.1
34
34
  Dynamic: author
35
35
  Dynamic: author-email
36
36
  Dynamic: classifier
@@ -1,3 +1,4 @@
1
+ MANIFEST.in
1
2
  README.md
2
3
  __init__.py
3
4
  __main__.py
@@ -5,6 +6,7 @@ api.py
5
6
  atomgit_hub.py
6
7
  cli.py
7
8
  config.py
9
+ requirements.txt
8
10
  setup.py
9
11
  test.py
10
12
  utils.py
@@ -3,5 +3,5 @@ requests>=2.31.0
3
3
  tqdm>=4.66.1
4
4
  colorama>=0.4.6
5
5
  tabulate>=0.9.0
6
- huggingface-hub>=0.20.0
7
- datasets>=2.16.0
6
+ huggingface-hub==1.1.7
7
+ datasets==4.4.1
@@ -14,6 +14,8 @@ from pathlib import Path
14
14
 
15
15
  # 设置Hugging Face Hub的API端点为AtomGit
16
16
  os.environ["HF_ENDPOINT"] = "https://hub.atomgit.com"
17
+ # 禁用Xet协议,避免 xet-write-token 请求
18
+ os.environ["HF_HUB_DISABLE_XET"] = "1"
17
19
  # 设置缓存目录
18
20
  cache_dir = os.path.expanduser("~/.cache/atomgit")
19
21
  os.makedirs(cache_dir, exist_ok=True)
@@ -9,6 +9,8 @@ from getpass import getpass
9
9
 
10
10
  # 设置Hugging Face Hub的API端点为AtomGit
11
11
  os.environ["HF_ENDPOINT"] = "https://hub.atomgit.com"
12
+ # 禁用Xet协议,避免 xet-write-token 请求
13
+ os.environ["HF_HUB_DISABLE_XET"] = "1"
12
14
  # 设置缓存目录
13
15
  cache_dir = os.path.expanduser("~/.cache/atomgit")
14
16
  os.makedirs(cache_dir, exist_ok=True)
@@ -37,7 +39,7 @@ except ImportError:
37
39
 
38
40
 
39
41
  @click.group()
40
- @click.version_option(version='1.0.4')
42
+ @click.version_option(version='1.0.5')
41
43
  def cli():
42
44
  """AtomGit CLI - 基于Transformers和Hugging Face Hub的AtomGit平台模型文件上传下载工具"""
43
45
  pass
@@ -0,0 +1,7 @@
1
+ click>=8.1.7
2
+ requests>=2.31.0
3
+ tqdm>=4.66.1
4
+ colorama>=0.4.6
5
+ tabulate>=0.9.0
6
+ huggingface-hub==1.1.7
7
+ datasets==4.4.1
@@ -31,7 +31,7 @@ def read_requirements():
31
31
 
32
32
  setup(
33
33
  name='atomgit',
34
- version='1.0.4',
34
+ version='1.0.5',
35
35
  author='AtomGit CLI Team',
36
36
  author_email='sa@atomgit.com',
37
37
  description='AtomGit模型文件上传下载CLI工具',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes