instance-repo 1.3.5.dev4__tar.gz → 1.3.5.dev6__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.
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/PKG-INFO +1 -1
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/__init__.py +1 -1
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/instances.py +16 -12
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/PKG-INFO +1 -1
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/pyproject.toml +1 -1
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/README.md +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/_routing.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/_site_defaults.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/artifacts.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/bootstrap.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/cache.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/cli.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/__init__.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/benchmarks.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/config.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/datasets.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/images.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/reports.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/scaffold.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/splits.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/versions.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/clients/workflows.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/concurrency.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/content.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/endpoints.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/errors.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/image.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/layout.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/loader.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/models.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/paths.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/release.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/repo.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/retry.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/__init__.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/acr.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/base.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/oss.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/oss_discovery.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/store/registry.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/tasktoml.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/transport.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo/validate.py +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/SOURCES.txt +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/dependency_links.txt +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/entry_points.txt +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/requires.txt +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/top_level.txt +0 -0
- {instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/setup.cfg +0 -0
|
@@ -166,7 +166,8 @@ class InstancesClient:
|
|
|
166
166
|
|
|
167
167
|
**OSS 双触发回退**(设计文档 §4.4.4):
|
|
168
168
|
a. ``TransportError(biz_code=92001)``(dataset 不存在)→ OSS 回退。
|
|
169
|
-
b. ``
|
|
169
|
+
b. ``TransportError(biz_code=92023)``(split 不存在)→ OSS 回退。
|
|
170
|
+
c. ``result is None``(registry 吞了 92003 instance 不存在)→ OSS 回退。
|
|
170
171
|
"""
|
|
171
172
|
# 只在调用方显式指定时才下发覆盖参数:注册表是可注入实现,
|
|
172
173
|
# 保持缺省调用形态与历史一致,避免破坏既有实现。
|
|
@@ -175,8 +176,8 @@ class InstancesClient:
|
|
|
175
176
|
result = self._reg.get(
|
|
176
177
|
dataset, version, instance_id, split, **overrides)
|
|
177
178
|
except TransportError as e:
|
|
178
|
-
# 路径 1: dataset 不存在(92001) → OSS 回退
|
|
179
|
-
if (e.biz_code
|
|
179
|
+
# 路径 1: dataset 不存在(92001) 或 split 不存在(92023) → OSS 回退
|
|
180
|
+
if (e.biz_code in (92001, 92023)
|
|
180
181
|
and fallback_to_oss and self._content is not None
|
|
181
182
|
and self._discovery_env_match(environment)):
|
|
182
183
|
return self._discover_instance(
|
|
@@ -196,7 +197,8 @@ class InstancesClient:
|
|
|
196
197
|
fallback_to_oss: bool = True) -> list[DatasetInstance]:
|
|
197
198
|
"""自动翻页取全量;``environment`` / ``metadata_model`` 语义同 :meth:`get`。
|
|
198
199
|
|
|
199
|
-
**OSS 回退**:当 ``TransportError(biz_code=92001)``(dataset
|
|
200
|
+
**OSS 回退**:当 ``TransportError(biz_code=92001)``(dataset 不存在)
|
|
201
|
+
或 ``biz_code=92023``(split 不存在)时,
|
|
200
202
|
若 ``fallback_to_oss=True`` 且 ``content_store`` 已注入,自动回退到 OSS
|
|
201
203
|
存储层列举实例。
|
|
202
204
|
"""
|
|
@@ -204,7 +206,7 @@ class InstancesClient:
|
|
|
204
206
|
try:
|
|
205
207
|
return self._reg.query(dataset, version, split, **overrides)
|
|
206
208
|
except TransportError as e:
|
|
207
|
-
if (e.biz_code
|
|
209
|
+
if (e.biz_code in (92001, 92023)
|
|
208
210
|
and fallback_to_oss and self._content is not None
|
|
209
211
|
and self._discovery_env_match(environment)):
|
|
210
212
|
return self._discover_instances(dataset, version, split)
|
|
@@ -228,7 +230,7 @@ class InstancesClient:
|
|
|
228
230
|
给出修复提示);``difficulty`` easy/medium/hard。**服务端无排序参数**
|
|
229
231
|
(固定 instance_id asc),SDK 不暴露。
|
|
230
232
|
|
|
231
|
-
**OSS 回退**:当 ``TransportError(biz_code=92001)`` 时回退到 OSS 存储层,
|
|
233
|
+
**OSS 回退**:当 ``TransportError(biz_code=92001)`` 或 ``92023`` 时回退到 OSS 存储层,
|
|
232
234
|
在客户端做过滤(q/tags/difficulty/instance_id)+ 内存分页。
|
|
233
235
|
"""
|
|
234
236
|
from urllib.parse import quote
|
|
@@ -283,7 +285,7 @@ class InstancesClient:
|
|
|
283
285
|
data, pagination = self._t.request_with_meta(
|
|
284
286
|
"GET", f"{self._BASE}?{query}")
|
|
285
287
|
except TransportError as e:
|
|
286
|
-
if (e.biz_code
|
|
288
|
+
if (e.biz_code in (92001, 92023)
|
|
287
289
|
and fallback_to_oss and self._content is not None
|
|
288
290
|
and self._discovery_env_match(environment)):
|
|
289
291
|
return self._discover_instances_paged(
|
|
@@ -463,9 +465,8 @@ class InstancesClient:
|
|
|
463
465
|
("dataset_name", dataset.strip()),
|
|
464
466
|
("split", split),
|
|
465
467
|
("prefix", full_prefix),
|
|
466
|
-
("page_size", str(int(page_size)))
|
|
467
|
-
|
|
468
|
-
params.append(("version", version.strip()))
|
|
468
|
+
("page_size", str(int(page_size))),
|
|
469
|
+
("version", (version or "").strip())]
|
|
469
470
|
if (dataset_split_id or "").strip():
|
|
470
471
|
params.append(("dataset_split_id", dataset_split_id.strip()))
|
|
471
472
|
if tk:
|
|
@@ -1186,9 +1187,12 @@ class InstancesClient:
|
|
|
1186
1187
|
try:
|
|
1187
1188
|
meta = self._reg.get(dataset, version, instance_id, split)
|
|
1188
1189
|
except TransportError as e:
|
|
1189
|
-
if (e.biz_code
|
|
1190
|
+
if (e.biz_code in (92001, 92023) and fallback_to_oss
|
|
1190
1191
|
and self._content is not None):
|
|
1191
|
-
# dataset 未注册
|
|
1192
|
+
# 92001: dataset 未注册
|
|
1193
|
+
# 92023: dataset 已注册但 split 在当前 environment 不存在
|
|
1194
|
+
# (如数据在 online 但 SDK 查了 pre)
|
|
1195
|
+
# 两种情况均回退到 OSS 直接下载(私网 + 系统调用方语义)
|
|
1192
1196
|
return self._pull_unregistered(
|
|
1193
1197
|
dataset, version, instance_id, dest_dir, split,
|
|
1194
1198
|
path=path)
|
|
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
|
{instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{instance_repo-1.3.5.dev4 → instance_repo-1.3.5.dev6}/instance_repo.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|