openbayes-cli 0.28.1__tar.gz → 0.28.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.
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/PKG-INFO +2 -2
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/minio_storage_usecase.py +20 -7
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/pyproject.toml +2 -2
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/README.md +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/base.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/dataset_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/dataset_list_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/dataset_upload_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/dataset_version_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/gear_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/job_run_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/minio_storage_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/org_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/resource_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/runtime_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/ssh_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/status_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/client/user_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/data.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/gear.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/hpc.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/org.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/commands/ssh.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/error.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/dataset.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/dataset_version.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/bayes_file.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/data_bindings.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/openbayes_gear.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/openbayes_ignore.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/openbayes_yaml.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/file/settings.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/party.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/resource.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/model/runtime.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/root.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/templates/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/templates/openbayes_zh-Hans.yaml +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/templates/openbayesignore.yaml +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/archive_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/auth_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/dataset_list_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/dataset_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/dataset_version_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/disk_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/gear_download_usecese.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/gear_logs_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/gear_run_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/gear_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/open_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/org_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/resource_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/runtime_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/ssh_usecase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/switch_usercase.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/usercases/upload_state_manager.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/utils/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/utils/add_global_param.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/bayes/utils.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/__init__.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/config.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/http_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/jwt_client.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/tracker.py +0 -0
- {openbayes_cli-0.28.1 → openbayes_cli-0.28.2}/openbayestool/updater.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openbayes-cli
|
|
3
|
-
Version: 0.28.
|
|
3
|
+
Version: 0.28.2
|
|
4
4
|
Summary: A Python CLI for OpenBayes
|
|
5
5
|
License: OpenBayes Public Source License
|
|
6
6
|
Keywords: openbayes,cli,machine learning
|
|
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Requires-Dist: aiohttp (>=3.10.2,<4.0.0)
|
|
22
22
|
Requires-Dist: archiver (>=0.2.2,<0.3.0)
|
|
23
|
-
Requires-Dist: boto3 (>=1.35,<
|
|
23
|
+
Requires-Dist: boto3 (>=1.35,<1.43)
|
|
24
24
|
Requires-Dist: click (>=8.1.7,<9)
|
|
25
25
|
Requires-Dist: gql (>=3.5.0,<4.0.0)
|
|
26
26
|
Requires-Dist: pathspec (>=0.12.1,<0.13.0)
|
|
@@ -135,11 +135,26 @@ _S3_CLIENT_TO_SESSION = {}
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
def _build_s3_client(endpoint: str, access_key: str, secret_key: str, read_timeout: int = 900):
|
|
138
|
-
|
|
138
|
+
config_kwargs = dict(
|
|
139
139
|
retries={"max_attempts": 10, "mode": "adaptive"},
|
|
140
140
|
connect_timeout=10,
|
|
141
141
|
read_timeout=read_timeout,
|
|
142
142
|
)
|
|
143
|
+
# botocore >= 1.36 默认 request_checksum_calculation="when_supported", 会给
|
|
144
|
+
# PutObject / UploadPart 自动附加 CRC32 校验和。在 HTTPS 的 S3 端点上, 这会让请求体
|
|
145
|
+
# 退化为 aws-chunked 流式上传 (X-Amz-Content-SHA256: STREAMING-UNSIGNED-PAYLOAD-TRAILER),
|
|
146
|
+
# 不再发送 Content-Length。许多 S3 兼容后端 (MinIO/Ceph 等) 不支持该模式, 会以
|
|
147
|
+
# MissingContentLength ("You must provide the Content-Length HTTP header") 拒绝上传。
|
|
148
|
+
# 这里显式退回 when_required 行为, 保证普通的带 Content-Length 的 PUT。
|
|
149
|
+
# 注意: 该参数在 botocore < 1.36 上不存在, 传入会抛 TypeError, 故做向后兼容降级。
|
|
150
|
+
try:
|
|
151
|
+
config = BotoCoreConfig(
|
|
152
|
+
request_checksum_calculation="when_required",
|
|
153
|
+
response_checksum_validation="when_required",
|
|
154
|
+
**config_kwargs,
|
|
155
|
+
)
|
|
156
|
+
except TypeError:
|
|
157
|
+
config = BotoCoreConfig(**config_kwargs)
|
|
143
158
|
return boto3.client(
|
|
144
159
|
"s3",
|
|
145
160
|
endpoint_url=endpoint,
|
|
@@ -975,12 +990,10 @@ def upload_source_code(party_name: str, source_code_path: str, storageType: str)
|
|
|
975
990
|
print("正在获取上传授权...")
|
|
976
991
|
policy = get_source_code_upload_policy(party_name, storageType)
|
|
977
992
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
aws_secret_access_key=policy.secretKey
|
|
983
|
-
)
|
|
993
|
+
# 复用 _build_s3_client, 确保源代码上传也带上 when_required 校验和配置;
|
|
994
|
+
# 否则 botocore >= 1.36 在 HTTPS 端点下会退化为 aws-chunked, 丢失 Content-Length,
|
|
995
|
+
# 导致 MinIO/Ceph 后端以 MissingContentLength 拒绝上传。
|
|
996
|
+
s3_client = _build_s3_client(policy.endpoint, policy.accessKey, policy.secretKey)
|
|
984
997
|
|
|
985
998
|
bucket_name, minio_path = extract_bucket_and_path(policy.path)
|
|
986
999
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "openbayes-cli"
|
|
3
|
-
version = "0.28.
|
|
3
|
+
version = "0.28.2"
|
|
4
4
|
description = "A Python CLI for OpenBayes"
|
|
5
5
|
authors = ["OpenBayes <dev@openbayes.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -46,7 +46,7 @@ tuspy = "^1.0.3"
|
|
|
46
46
|
tqdm = "^4.66.5"
|
|
47
47
|
toml = "^0.10.2"
|
|
48
48
|
pydantic = "^2.9.2"
|
|
49
|
-
boto3 = "
|
|
49
|
+
boto3 = ">=1.35,<1.43"
|
|
50
50
|
|
|
51
51
|
[tool.poetry.group.dev.dependencies]
|
|
52
52
|
pytest = "^8.2.2"
|
|
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
|
|
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
|
|
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
|