instance-repo 1.0.9.dev1__tar.gz → 1.0.9.dev3__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.0.9.dev1 → instance_repo-1.0.9.dev3}/PKG-INFO +3 -2
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/README.md +2 -1
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/__init__.py +1 -1
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/cli.py +10 -12
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/splits.py +6 -1
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/models.py +4 -3
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/PKG-INFO +3 -2
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/pyproject.toml +1 -1
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/_routing.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/_site_defaults.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/bootstrap.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/cache.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/__init__.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/benchmarks.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/config.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/datasets.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/images.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/instances.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/reports.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/scaffold.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/versions.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/clients/workflows.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/concurrency.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/content.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/endpoints.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/errors.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/image.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/layout.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/loader.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/paths.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/release.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/repo.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/retry.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/store/__init__.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/store/acr.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/store/base.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/store/oss.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/store/registry.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/tasktoml.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/transport.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo/validate.py +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/SOURCES.txt +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/dependency_links.txt +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/entry_points.txt +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/requires.txt +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/top_level.txt +0 -0
- {instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: instance-repo
|
|
3
|
-
Version: 1.0.9.
|
|
3
|
+
Version: 1.0.9.dev3
|
|
4
4
|
Summary: InstanceRepo SDK — 评测 Instance 统一存储客户端(SDK-only;控制面由 apiserver 承载)
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -149,9 +149,10 @@ keys = repo.list_user_data(uid)
|
|
|
149
149
|
irepo --help
|
|
150
150
|
# 全局参数:--api-env / --api-base / --cluster / --storage-env / --metadata-model / --profile
|
|
151
151
|
# 无 --api-key:凭据只从 AP_API_KEY(旧别名 INSTANCEREPO_TOKEN)读取,避免进 shell history
|
|
152
|
-
#
|
|
152
|
+
# 20 个子命令:validate / push / push-many / deliver / pull / list / get
|
|
153
153
|
# publish / grant / feedback / report / whoami / user-data
|
|
154
154
|
# repo-config / create / claim / version / image
|
|
155
|
+
# split(list/get/set-run-type)/ dataset(list/get/update/access/revoke/benchmarks/workflows)
|
|
155
156
|
irepo image ref --dataset alibaba/mybench --instance-id inst-1 --split test
|
|
156
157
|
irepo image pull '<acr>/<ns>/mybench:test-inst-1' ./out.tar
|
|
157
158
|
```
|
|
@@ -136,9 +136,10 @@ keys = repo.list_user_data(uid)
|
|
|
136
136
|
irepo --help
|
|
137
137
|
# 全局参数:--api-env / --api-base / --cluster / --storage-env / --metadata-model / --profile
|
|
138
138
|
# 无 --api-key:凭据只从 AP_API_KEY(旧别名 INSTANCEREPO_TOKEN)读取,避免进 shell history
|
|
139
|
-
#
|
|
139
|
+
# 20 个子命令:validate / push / push-many / deliver / pull / list / get
|
|
140
140
|
# publish / grant / feedback / report / whoami / user-data
|
|
141
141
|
# repo-config / create / claim / version / image
|
|
142
|
+
# split(list/get/set-run-type)/ dataset(list/get/update/access/revoke/benchmarks/workflows)
|
|
142
143
|
irepo image ref --dataset alibaba/mybench --instance-id inst-1 --split test
|
|
143
144
|
irepo image pull '<acr>/<ns>/mybench:test-inst-1' ./out.tar
|
|
144
145
|
```
|
|
@@ -870,19 +870,17 @@ def main(argv=None, *, repo: Repo | None = None, out=None) -> int:
|
|
|
870
870
|
# 1.0.10:取版本完整详情(splits 明细 + manifest + 时间戳)。
|
|
871
871
|
# split_first 分支时服务端聚合 legacy 投影。
|
|
872
872
|
dv = r.versions.get(dataset, version, environment=args.environment)
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
file=out)
|
|
878
|
-
print(f"dataset_version_id={dv.
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
print(f" split\t{s.get('name','')}\tstatus={s.get('status','')}"
|
|
883
|
-
f"\toss_prefix={s.get('oss_prefix','')}"
|
|
873
|
+
# versions.get 返回 DatasetVersion dataclass(字段访问,非 dict 取值)。
|
|
874
|
+
print(f"version\t{dv.version}\tstatus={dv.status}"
|
|
875
|
+
f"\tstorage_path={dv.storage_path or ''}", file=out)
|
|
876
|
+
print(f"published_at={dv.published_at or ''}"
|
|
877
|
+
f"\tlast_ingested_at={dv.last_ingested_at or ''}", file=out)
|
|
878
|
+
print(f"dataset_version_id={dv.dataset_version_id or ''}", file=out)
|
|
879
|
+
for s in dv.splits:
|
|
880
|
+
print(f" split\t{s.get('name', '')}\tstatus={s.get('status', '')}"
|
|
881
|
+
f"\toss_prefix={s.get('oss_prefix', '')}"
|
|
884
882
|
f"\tinstance_count={s.get('instance_count') or 0}", file=out)
|
|
885
|
-
manifest = dv.
|
|
883
|
+
manifest = dv.manifest or {}
|
|
886
884
|
print(f"manifest\tinstance_count={manifest.get('instance_count') or 0}"
|
|
887
885
|
f"\tfile_count={manifest.get('file_count') or 0}"
|
|
888
886
|
f"\tsize_bytes={manifest.get('size_bytes') or 0}", file=out)
|
|
@@ -224,11 +224,14 @@ class SplitsClient:
|
|
|
224
224
|
|
|
225
225
|
def update(self, dataset: str, split: str | None = None, *,
|
|
226
226
|
version: str | None = None, run_type: str = "",
|
|
227
|
-
dataset_split_id: str | None = None
|
|
227
|
+
dataset_split_id: str | None = None,
|
|
228
|
+
environment: str | None = None) -> DatasetSplit:
|
|
228
229
|
"""更新 split 记录(``PATCH /datasets/splits/detail``)。
|
|
229
230
|
|
|
230
231
|
服务端 body 仅接受 ``run_type``(**必填**:"train"/"eval",空串=清除);
|
|
231
232
|
仅 online 环境(split 记录 pre 环境的写经 versions.update 走集合路由)。
|
|
233
|
+
``environment`` 缺省由 profile 派生(同 get/list);profile 派生为 pre
|
|
234
|
+
而目标 split 记录在 online 集合时,须显式传 ``environment="online"``。
|
|
232
235
|
|
|
233
236
|
寻址二选一:``dataset_split_id``(优先,split-first 精确记录 id)或
|
|
234
237
|
``dataset``+``split``(+可选 ``version``)name 三元组。
|
|
@@ -248,6 +251,8 @@ class SplitsClient:
|
|
|
248
251
|
raise SchemaError(
|
|
249
252
|
f"invalid run_type {rt!r}; must be one of "
|
|
250
253
|
f"{', '.join(RUN_TYPE_VALUES)} (empty string to clear)")
|
|
254
|
+
if (env := self._env(environment)):
|
|
255
|
+
q += f"&environment={quote(env, safe='')}"
|
|
251
256
|
data = self._t.patch(f"{self._BASE}/detail?{q}", {"run_type": rt})
|
|
252
257
|
return DatasetSplit.from_dict(data) if isinstance(data, dict) else DatasetSplit()
|
|
253
258
|
|
|
@@ -124,7 +124,7 @@ class DatasetSeries:
|
|
|
124
124
|
available_envs: list[str] = field(default_factory=list)
|
|
125
125
|
# 服务端 `DatasetSeriesStatus`("" 正常 / "deprecated");列表项
|
|
126
126
|
# `DatasetListItem.Status` 带 `omitempty`,正常态不出现。
|
|
127
|
-
|
|
127
|
+
status: str = ""
|
|
128
128
|
|
|
129
129
|
def validate(self) -> None:
|
|
130
130
|
if self.visibility not in VISIBILITY_VALUES:
|
|
@@ -139,11 +139,12 @@ class DatasetSeries:
|
|
|
139
139
|
"""create 请求体:剔除服务端派生/服务端分配的字段。
|
|
140
140
|
|
|
141
141
|
teacher_direction / teacher_type 由 apiserver 从 benchmark 派生(传了也被忽略),
|
|
142
|
-
dataset_id 由服务端分配;dataset_l1 / dataset_l2 由 dataset_name
|
|
142
|
+
dataset_id 由服务端分配;dataset_l1 / dataset_l2 由 dataset_name 推导。status
|
|
143
|
+
是服务端 DatasetSeriesStatus(deprecated 打标),create 不接受。都不发送,
|
|
143
144
|
避免让调用方误以为这些值能由客户端决定。
|
|
144
145
|
"""
|
|
145
146
|
drop = {"teacher_direction", "teacher_type", "dataset_id",
|
|
146
|
-
"dataset_l1", "dataset_l2"}
|
|
147
|
+
"dataset_l1", "dataset_l2", "status"}
|
|
147
148
|
return {k: v for k, v in self.to_dict().items() if k not in drop}
|
|
148
149
|
|
|
149
150
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: instance-repo
|
|
3
|
-
Version: 1.0.9.
|
|
3
|
+
Version: 1.0.9.dev3
|
|
4
4
|
Summary: InstanceRepo SDK — 评测 Instance 统一存储客户端(SDK-only;控制面由 apiserver 承载)
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -149,9 +149,10 @@ keys = repo.list_user_data(uid)
|
|
|
149
149
|
irepo --help
|
|
150
150
|
# 全局参数:--api-env / --api-base / --cluster / --storage-env / --metadata-model / --profile
|
|
151
151
|
# 无 --api-key:凭据只从 AP_API_KEY(旧别名 INSTANCEREPO_TOKEN)读取,避免进 shell history
|
|
152
|
-
#
|
|
152
|
+
# 20 个子命令:validate / push / push-many / deliver / pull / list / get
|
|
153
153
|
# publish / grant / feedback / report / whoami / user-data
|
|
154
154
|
# repo-config / create / claim / version / image
|
|
155
|
+
# split(list/get/set-run-type)/ dataset(list/get/update/access/revoke/benchmarks/workflows)
|
|
155
156
|
irepo image ref --dataset alibaba/mybench --instance-id inst-1 --split test
|
|
156
157
|
irepo image pull '<acr>/<ns>/mybench:test-inst-1' ./out.tar
|
|
157
158
|
```
|
|
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.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{instance_repo-1.0.9.dev1 → instance_repo-1.0.9.dev3}/instance_repo.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|