ap-client 0.6.1.dev2__tar.gz → 0.6.1.dev4__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.
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/PKG-INFO +1 -1
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/irepo_sdk.py +6 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/ossutil_io.py +12 -7
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/pyproject.toml +1 -1
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/__init__.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/akpool_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/api.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/cli.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/config.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/dataset_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/dataset_name.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/dataset_register.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/dfs_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/exporter.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/fs_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/instance_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/instance_options.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/managed_ak.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/manifest_view.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/ossutil_hash.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/profile_commands.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/repo_read_guard.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/share_api.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/split_publish.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/tbb.py +0 -0
- {ap_client-0.6.1.dev2 → ap_client-0.6.1.dev4}/ap_client/waiter.py +0 -0
|
@@ -1082,6 +1082,12 @@ _BIZ_CODE_RULES: dict[int, tuple[str, int]] = {
|
|
|
1082
1082
|
1,
|
|
1083
1083
|
),
|
|
1084
1084
|
94021: ("This dataset does not exist; run: ap dataset create <dataset> --benchmark <b>", 1),
|
|
1085
|
+
92024: (
|
|
1086
|
+
"Dataset namespace conflict: a root (L1) and child (L1/L2) dataset cannot share "
|
|
1087
|
+
"a namespace. Rename the new dataset, or register the data as a split of the "
|
|
1088
|
+
"existing dataset: ap dataset register <existing> --unversioned --split <name>",
|
|
1089
|
+
1,
|
|
1090
|
+
),
|
|
1085
1091
|
94022: (
|
|
1086
1092
|
"No access grant on this user storage space; ask the owner to run: ap fs access grant --user <your-id> --role reader",
|
|
1087
1093
|
1,
|
|
@@ -298,13 +298,13 @@ class OssFiles:
|
|
|
298
298
|
def _dataset_for_scope(self, scope: str) -> str | None:
|
|
299
299
|
"""解析覆盖 ``scope``(完整对象 key)的已注册 dataset 名。
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
301
|
+
凭据请求携带 ``dataset_name``:普通调用方在控制面按它走 dataset RBAC(旧 prod
|
|
302
|
+
构建也要求显式上下文)。ans:// 路径是 dataset 相对的,dataset 名就是最长前缀
|
|
303
|
+
(两段 L1/L2 优先,单段 L1 兜底);由于 ``A``(L1)与 ``A/B`` 可能同时是合法布局,
|
|
304
|
+
这里以**注册表为准**:候选按"最长优先"查注册,第一个命中者胜出;都未注册时退回
|
|
305
|
+
最长候选(系统白名单/平台管理员的 raw 路径与服务端的 list-only 发现都会校验
|
|
306
|
+
claimed 命名空间,写操作仍由服务端拒绝)。结果按相对路径缓存,一次命令内多次
|
|
307
|
+
签发只查一次。
|
|
308
308
|
"""
|
|
309
309
|
prefix = self.binding.prefix
|
|
310
310
|
if not scope.startswith(prefix):
|
|
@@ -352,6 +352,11 @@ class OssFiles:
|
|
|
352
352
|
dataset = self._dataset_for_scope(scope)
|
|
353
353
|
if dataset:
|
|
354
354
|
kwargs["dataset_name"] = dataset
|
|
355
|
+
# 双参数齐发:``dataset_source=oss`` 对系统白名单/平台管理员是跳过 RBAC 的
|
|
356
|
+
# raw 快速路径(ossutil 式,与数据集注册无关);普通调用方在新 apiserver 上会
|
|
357
|
+
# 忽略该参数并回落 dataset RBAC(用上面的 dataset_name),老 prod 构建本就
|
|
358
|
+
# 不认该参数。两者并存才能同时保住"系统身份无注册直读"与"普通用户受控"。
|
|
359
|
+
kwargs["dataset_source"] = "oss"
|
|
355
360
|
cred = dict(
|
|
356
361
|
self.repo.transport.get_oss_credentials(
|
|
357
362
|
self.binding.bucket,
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ap-client"
|
|
7
|
-
version = "0.6.1.
|
|
7
|
+
version = "0.6.1.dev4"
|
|
8
8
|
description = "Agent Platform API Client & CLI"
|
|
9
9
|
readme = { text = "A lightweight Python SDK and command line interface for Agent Platform. It provides helpers for configuring API access and managing templates, datasets, jobs, and groups.", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.10"
|
|
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
|