ap-client 0.9.0.dev3__tar.gz → 0.10.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.
Files changed (48) hide show
  1. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/PKG-INFO +3 -3
  2. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/api.py +13 -19
  3. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/cli.py +215 -519
  4. ap_client-0.10.1.dev1/ap_client/cli_input.py +148 -0
  5. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/cli_submission_defaults.py +5 -0
  6. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/credit_commands.py +7 -9
  7. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/dataset_commands.py +272 -32
  8. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/exporter.py +1 -1
  9. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/instance_commands.py +67 -11
  10. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/instance_options.py +41 -3
  11. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/managed_ak.py +379 -101
  12. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_commands.py +31 -51
  13. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_diagnostics.py +16 -1
  14. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/pyproject.toml +13 -4
  15. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/__init__.py +0 -0
  16. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/akpool_commands.py +0 -0
  17. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/canonical_get.py +0 -0
  18. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/canonical_put.py +0 -0
  19. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/cli_help.py +0 -0
  20. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/cluster_layout_fetcher.py +0 -0
  21. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/cluster_region_resolver.py +0 -0
  22. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/config.py +0 -0
  23. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/dataset_name.py +0 -0
  24. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/dataset_register.py +0 -0
  25. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/dfs_commands.py +0 -0
  26. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/fs_commands.py +0 -0
  27. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/fs_storage.py +0 -0
  28. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/fs_transfer.py +0 -0
  29. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/irepo_sdk.py +0 -0
  30. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/manifest_view.py +0 -0
  31. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/ossutil_hash.py +0 -0
  32. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/ossutil_io.py +0 -0
  33. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_cascade_all.py +0 -0
  34. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_cascade_cli.py +0 -0
  35. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_cascade_display.py +0 -0
  36. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_cascade_state.py +0 -0
  37. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_display.py +0 -0
  38. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/profile_references.py +0 -0
  39. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/replica_policy.py +0 -0
  40. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/repo_read_guard.py +0 -0
  41. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/share_api.py +0 -0
  42. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/shared_adapter.py +0 -0
  43. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/shared_commands.py +0 -0
  44. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/split_publish.py +0 -0
  45. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/submission_metadata.py +0 -0
  46. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/tbb.py +0 -0
  47. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/tool_manifest.py +0 -0
  48. {ap_client-0.9.0.dev3 → ap_client-0.10.1.dev1}/ap_client/waiter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ap-client
3
- Version: 0.9.0.dev3
3
+ Version: 0.10.1.dev1
4
4
  Summary: Agent Platform API Client & CLI
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click<8.2.0,>=8.1.8
@@ -11,9 +11,9 @@ Requires-Dist: rich>=13.0.0
11
11
  Requires-Dist: typer<0.21.0,>=0.20.1
12
12
  Requires-Dist: websockets>=13.0
13
13
  Provides-Extra: all
14
- Requires-Dist: instance-repo[oss]<2.0.0,>=1.7.1; extra == 'all'
14
+ Requires-Dist: instance-repo[oss]==1.7.2.dev1; extra == 'all'
15
15
  Provides-Extra: dataset
16
- Requires-Dist: instance-repo[oss]<2.0.0,>=1.7.1; extra == 'dataset'
16
+ Requires-Dist: instance-repo[oss]==1.7.2.dev1; extra == 'dataset'
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  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.
@@ -2505,7 +2505,6 @@ class APIClient:
2505
2505
  transparency: Optional[Literal["whitebox", "blackbox"]] = None,
2506
2506
  idempotency_key: Optional[str] = None,
2507
2507
  group_concurrency_policy: Optional[dict] = None,
2508
- visibility: Optional[Literal["queue", "private"]] = None,
2509
2508
  metrics_retry_policy: Optional[dict] = None,
2510
2509
  ) -> dict:
2511
2510
  """Create a group with optional scheduling defaults for its Jobs.
@@ -2514,8 +2513,6 @@ class APIClient:
2514
2513
  """
2515
2514
  if priority is not None and priority not in {"high", "medium"}:
2516
2515
  raise ValueError("priority must be one of high/medium")
2517
- if visibility is not None and visibility not in {"queue", "private"}:
2518
- raise ValueError("visibility must be queue or private")
2519
2516
  if transparency is not None and transparency not in {"whitebox", "blackbox"}:
2520
2517
  raise ValueError("transparency must be whitebox or blackbox")
2521
2518
  if transparency == "blackbox" and not idempotency_key:
@@ -2528,8 +2525,6 @@ class APIClient:
2528
2525
  raise ValueError("ak_ids entries must be nonempty strings")
2529
2526
  references = list(dict.fromkeys(references))
2530
2527
  body: dict = {}
2531
- if visibility is not None:
2532
- body["visibility"] = visibility
2533
2528
  if metrics_retry_policy is not None:
2534
2529
  body["metrics_retry_policy"] = metrics_retry_policy
2535
2530
  if transparency is not None:
@@ -2634,6 +2629,7 @@ class APIClient:
2634
2629
  # ─── Credential assignment ────────────────────────────────────
2635
2630
  credential_type: Optional[str] = None,
2636
2631
  account_pool: Optional[str] = None,
2632
+ account_claims: Optional[dict] = None,
2637
2633
  # ─── Eval config ──────────────────────────────────────────────
2638
2634
  eval_config: Optional[dict] = None,
2639
2635
  # ─── Profile mode fields ───────────────────────────────────────
@@ -2660,13 +2656,11 @@ class APIClient:
2660
2656
  instance_range: Optional[str] = None,
2661
2657
  profile: Optional[str] = None,
2662
2658
  transparency: Optional[Literal["whitebox", "blackbox"]] = None,
2663
- visibility: Optional[Literal["queue", "private"]] = None,
2664
2659
  metrics_retry_policy: Optional[dict] = None,
2665
2660
  ) -> dict:
2666
2661
  """Create a job."""
2667
2662
  body = self.build_create_job_body(
2668
2663
  transparency=transparency,
2669
- visibility=visibility,
2670
2664
  template=template,
2671
2665
  params=params,
2672
2666
  params_list=params_list,
@@ -2694,6 +2688,7 @@ class APIClient:
2694
2688
  disable_loongcollector=disable_loongcollector,
2695
2689
  credential_type=credential_type,
2696
2690
  account_pool=account_pool,
2691
+ account_claims=account_claims,
2697
2692
  eval_config=eval_config,
2698
2693
  profile=profile,
2699
2694
  profile_id=profile_id,
@@ -2753,6 +2748,7 @@ class APIClient:
2753
2748
  # ─── Credential assignment ────────────────────────────────────
2754
2749
  credential_type: Optional[str] = None,
2755
2750
  account_pool: Optional[str] = None,
2751
+ account_claims: Optional[dict] = None,
2756
2752
  # ─── Eval config ──────────────────────────────────────────────
2757
2753
  eval_config: Optional[dict] = None,
2758
2754
  # ─── Profile mode fields ───────────────────────────────────────
@@ -2780,12 +2776,9 @@ class APIClient:
2780
2776
  instance_range: Optional[str] = None,
2781
2777
  profile: Optional[str] = None,
2782
2778
  transparency: Optional[Literal["whitebox", "blackbox"]] = None,
2783
- visibility: Optional[Literal["queue", "private"]] = None,
2784
2779
  metrics_retry_policy: Optional[dict] = None,
2785
2780
  ) -> dict:
2786
2781
  """Build the /jobs request body for job creation."""
2787
- if visibility is not None and visibility not in {"queue", "private"}:
2788
- raise ValueError("visibility must be queue or private")
2789
2782
  if transparency is not None and transparency not in {"whitebox", "blackbox"}:
2790
2783
  raise ValueError("transparency must be whitebox or blackbox")
2791
2784
  if profile is not None and (profile_id is not None or profile_version is not None):
@@ -2875,6 +2868,8 @@ class APIClient:
2875
2868
  body["credential_type"] = credential_type
2876
2869
  if account_pool is not None:
2877
2870
  body["account_pool"] = account_pool
2871
+ if account_claims is not None:
2872
+ body["account_claims"] = account_claims
2878
2873
 
2879
2874
  # Eval config
2880
2875
  if eval_config is not None:
@@ -2914,8 +2909,6 @@ class APIClient:
2914
2909
  if experiment is not None:
2915
2910
  body["experiment"] = experiment
2916
2911
 
2917
- if visibility is not None:
2918
- body["visibility"] = visibility
2919
2912
  if transparency is not None:
2920
2913
  body["transparency"] = transparency
2921
2914
  return body
@@ -2984,7 +2977,7 @@ class APIClient:
2984
2977
  upstream_job_id: Optional[str] = None,
2985
2978
  next_token: Optional[str] = None,
2986
2979
  pagination: Optional[str] = None,
2987
- include_total: bool = False,
2980
+ include_total: bool = True,
2988
2981
  ak_id: Optional[str] = None,
2989
2982
  ) -> dict:
2990
2983
  """List jobs."""
@@ -3050,7 +3043,8 @@ class APIClient:
3050
3043
  params["next_token"] = next_token
3051
3044
  if pagination:
3052
3045
  params["pagination"] = pagination
3053
- params["include_total"] = include_total
3046
+ if not include_total:
3047
+ params["include_total"] = False
3054
3048
  response = self._get("/jobs", params=params)
3055
3049
  _ensure_next_token_honored(response, next_token=next_token, endpoint="/jobs")
3056
3050
  return response
@@ -3232,11 +3226,10 @@ class APIClient:
3232
3226
  upstream_platform: Optional[str] = None,
3233
3227
  upstream_job_id: Optional[str] = None,
3234
3228
  ak_id: Optional[str] = None,
3235
- include_total: bool = False,
3236
3229
  ) -> dict:
3237
- """List groups. Exact totals are opt-in and subject to the server query budget."""
3230
+ """List groups."""
3238
3231
  validate_ak_id(ak_id)
3239
- params: dict = {"skip": skip, "limit": limit, "include_total": include_total}
3232
+ params: dict = {"skip": skip, "limit": limit}
3240
3233
  if ak_id is not None:
3241
3234
  params["ak_id"] = ak_id
3242
3235
  if name is not None:
@@ -3298,7 +3291,7 @@ class APIClient:
3298
3291
  upstream_job_id: Optional[str] = None,
3299
3292
  next_token: Optional[str] = None,
3300
3293
  pagination: Optional[str] = None,
3301
- include_total: bool = False,
3294
+ include_total: bool = True,
3302
3295
  ) -> dict:
3303
3296
  """List jobs in a group."""
3304
3297
  params: dict = {"skip": skip, "limit": limit}
@@ -3326,7 +3319,8 @@ class APIClient:
3326
3319
  params["next_token"] = next_token
3327
3320
  if pagination:
3328
3321
  params["pagination"] = pagination
3329
- params["include_total"] = include_total
3322
+ if not include_total:
3323
+ params["include_total"] = False
3330
3324
  endpoint = f"/groups/{quote(group_id)}/jobs"
3331
3325
  response = self._get(endpoint, params=params)
3332
3326
  _ensure_next_token_honored(response, next_token=next_token, endpoint=endpoint)