instance-repo 1.3.5.dev5__tar.gz → 1.3.5.dev7__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 (49) hide show
  1. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/PKG-INFO +1 -1
  2. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/__init__.py +1 -1
  3. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/instances.py +16 -9
  4. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/PKG-INFO +1 -1
  5. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/pyproject.toml +1 -1
  6. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/README.md +0 -0
  7. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/_routing.py +0 -0
  8. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/_site_defaults.py +0 -0
  9. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/artifacts.py +0 -0
  10. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/bootstrap.py +0 -0
  11. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/cache.py +0 -0
  12. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/cli.py +0 -0
  13. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/__init__.py +0 -0
  14. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/benchmarks.py +0 -0
  15. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/config.py +0 -0
  16. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/datasets.py +0 -0
  17. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/images.py +0 -0
  18. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/reports.py +0 -0
  19. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/scaffold.py +0 -0
  20. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/splits.py +0 -0
  21. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/versions.py +0 -0
  22. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/clients/workflows.py +0 -0
  23. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/concurrency.py +0 -0
  24. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/content.py +0 -0
  25. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/endpoints.py +0 -0
  26. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/errors.py +0 -0
  27. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/image.py +0 -0
  28. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/layout.py +0 -0
  29. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/loader.py +0 -0
  30. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/models.py +0 -0
  31. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/paths.py +0 -0
  32. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/release.py +0 -0
  33. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/repo.py +0 -0
  34. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/retry.py +0 -0
  35. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/__init__.py +0 -0
  36. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/acr.py +0 -0
  37. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/base.py +0 -0
  38. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/oss.py +0 -0
  39. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/oss_discovery.py +0 -0
  40. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/store/registry.py +0 -0
  41. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/tasktoml.py +0 -0
  42. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/transport.py +0 -0
  43. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo/validate.py +0 -0
  44. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/SOURCES.txt +0 -0
  45. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/dependency_links.txt +0 -0
  46. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/entry_points.txt +0 -0
  47. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/requires.txt +0 -0
  48. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/instance_repo.egg-info/top_level.txt +0 -0
  49. {instance_repo-1.3.5.dev5 → instance_repo-1.3.5.dev7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instance-repo
3
- Version: 1.3.5.dev5
3
+ Version: 1.3.5.dev7
4
4
  Summary: InstanceRepo SDK — 评测 Instance 统一存储客户端(SDK-only;控制面由 apiserver 承载)
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -20,7 +20,7 @@ from .errors import (
20
20
  TransportError,
21
21
  )
22
22
 
23
- __version__ = "1.3.5.dev5"
23
+ __version__ = "1.3.5.dev7"
24
24
 
25
25
  __all__ = [
26
26
  "Repo", "load_instances",
@@ -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. ``result is None``(registry 吞了 92003 instance 不存在)→ OSS 回退。
169
+ b. ``TransportError(biz_code=92023)``(split 不存在)→ OSS 回退。
170
+ c. ``result is None``(registry 吞了 92003 instance 不存在)→ OSS 回退。
170
171
  """
171
172
  # 只在调用方显式指定时才下发覆盖参数:注册表是可注入实现,
172
173
  # 保持缺省调用形态与历史一致,避免破坏既有实现。
@@ -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
  """
@@ -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
@@ -471,10 +473,8 @@ class InstancesClient:
471
473
  params.append(("token", tk))
472
474
  if env:
473
475
  params.append(("environment", env))
474
- # metadata_model 必须始终发送——apiserver 据此决定走 split_first
475
- # 还是 version_first 路径。缺失时 apiserver 默认 version_first,
476
- # 会对 split_first 数据集错误要求 version 非空(92005)。
477
- params.append(("metadata_model", mm or "split_first"))
476
+ if mm:
477
+ params.append(("metadata_model", mm))
478
478
  qs = "&".join(f"{k}={quote(v, safe='')}" for k, v in params)
479
479
  data = self._t.get(f"/apis/v1/datasets/objects?{qs}")
480
480
  if not isinstance(data, dict):
@@ -1494,9 +1494,16 @@ class InstancesClient:
1494
1494
  oss_prefix=self._oss_prefix)
1495
1495
  if tree is None:
1496
1496
  from ..errors import DatasetNotFound
1497
+ bucket = getattr(self._p, "oss_bucket", "") or ""
1498
+ from .config import dataset_environment_for
1499
+ env = dataset_environment_for(
1500
+ getattr(self._p, "storage_env", "")) or ""
1497
1501
  raise DatasetNotFound(
1498
- f"instance {instance_id!r} not found in OSS for "
1499
- f"dataset {dataset!r}")
1502
+ f"instance {instance_id!r} not found in OSS bucket "
1503
+ f"{bucket!r} (environment={env or 'unknown'!r}) for "
1504
+ f"dataset {dataset!r}; the data may be registered in a "
1505
+ f"different storage environment — select a cluster whose "
1506
+ f"storage_env matches the dataset's environment")
1500
1507
 
1501
1508
  metadata_key, files = tree
1502
1509
  dest_root = Path(dest_dir) / instance_id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instance-repo
3
- Version: 1.3.5.dev5
3
+ Version: 1.3.5.dev7
4
4
  Summary: InstanceRepo SDK — 评测 Instance 统一存储客户端(SDK-only;控制面由 apiserver 承载)
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "instance-repo"
7
- version = "1.3.5.dev5"
7
+ version = "1.3.5.dev7"
8
8
  description = "InstanceRepo SDK — 评测 Instance 统一存储客户端(SDK-only;控制面由 apiserver 承载)"
9
9
  requires-python = ">=3.10"
10
10
  readme = "README.md"