ap-client 0.7.1.dev0__tar.gz → 0.7.1.dev1__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.7.1.dev0 → ap_client-0.7.1.dev1}/PKG-INFO +1 -1
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/dataset_commands.py +20 -4
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/pyproject.toml +1 -1
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/__init__.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/akpool_commands.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/api.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/cli.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/config.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/dataset_name.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/dataset_register.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/dfs_commands.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/exporter.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/fs_commands.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/fs_storage.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/fs_transfer.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/instance_commands.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/instance_options.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/irepo_sdk.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/managed_ak.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/manifest_view.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/ossutil_hash.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/ossutil_io.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_cascade_all.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_cascade_cli.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_cascade_display.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_cascade_state.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_commands.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_diagnostics.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/profile_display.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/repo_read_guard.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/share_api.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/split_publish.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/tbb.py +0 -0
- {ap_client-0.7.1.dev0 → ap_client-0.7.1.dev1}/ap_client/waiter.py +0 -0
|
@@ -695,20 +695,31 @@ def _unversioned_split(
|
|
|
695
695
|
|
|
696
696
|
|
|
697
697
|
def _versioned_split(
|
|
698
|
-
dataset: str,
|
|
698
|
+
dataset: str,
|
|
699
|
+
version: str,
|
|
700
|
+
split: str,
|
|
701
|
+
*,
|
|
702
|
+
environment: Optional[str] = None,
|
|
703
|
+
oss_fallback: bool = True,
|
|
699
704
|
) -> Optional[dict]:
|
|
700
705
|
"""取指定 version 里的单个 split 记录;不存在返回 ``None``(不当作错误)。
|
|
701
706
|
|
|
702
707
|
与 ``_unversioned_split`` 同源,走 recordsvc 的 ``splits.get``(SDK 自带
|
|
703
|
-
version_first 内嵌投影的 legacy 回退)
|
|
708
|
+
version_first 内嵌投影的 legacy 回退)。``split get`` 保持默认 OSS 发现回退;
|
|
709
|
+
``split create`` 的幂等检查须传 ``oss_fallback=False``:dataset 刚创建或
|
|
710
|
+
尚未上传时 OSS prefix 不存在,``_discover_split`` 会把"split 不存在"误报为
|
|
711
|
+
查询失败,404 → legacy 回退 → None 即可判定"不存在 → 走 create"。
|
|
704
712
|
"""
|
|
705
713
|
from .irepo_sdk import _reason
|
|
706
714
|
|
|
707
715
|
env = _environment(environment)
|
|
708
716
|
repo = _dataset_repo()
|
|
717
|
+
read_kwargs = _read_env_kwargs(repo, repo.splits, "get", env)
|
|
718
|
+
if not oss_fallback:
|
|
719
|
+
read_kwargs["fallback_to_oss"] = False
|
|
709
720
|
try:
|
|
710
721
|
record = repo.splits.get(
|
|
711
|
-
dataset, split, version=version, **
|
|
722
|
+
dataset, split, version=version, **read_kwargs
|
|
712
723
|
)
|
|
713
724
|
except Exception as exc: # noqa: BLE001
|
|
714
725
|
raise _fail(
|
|
@@ -2027,7 +2038,12 @@ def dataset_split_create(
|
|
|
2027
2038
|
# 契约对齐——旧 Version PATCH(splits 全量替换 / split_run_types)已被服务端
|
|
2028
2039
|
# 拒绝("split-first Version group updates are not supported")。
|
|
2029
2040
|
env = _environment(environment)
|
|
2030
|
-
|
|
2041
|
+
# 幂等预检禁用 OSS 发现回退:dataset 刚创建或尚未上传时 OSS prefix 不存在,
|
|
2042
|
+
# _discover_split 会把"split 不存在"误报为查询失败("not found in OSS");
|
|
2043
|
+
# recordsvc 404 → legacy 回退 → None 即判定"不存在 → 走 create"。
|
|
2044
|
+
existing = _versioned_split(
|
|
2045
|
+
dataset, resolved_version, split, environment=environment, oss_fallback=False
|
|
2046
|
+
)
|
|
2031
2047
|
if existing is not None:
|
|
2032
2048
|
# 幂等:已存在同名 split(设计 §4.3)。
|
|
2033
2049
|
payload = dict(existing)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ap-client"
|
|
7
|
-
version = "0.7.1.
|
|
7
|
+
version = "0.7.1.dev1"
|
|
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
|
|
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
|