ap-client 0.5.2.dev0__tar.gz → 0.5.2.dev2__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.5.2.dev0 → ap_client-0.5.2.dev2}/PKG-INFO +3 -3
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/instance_commands.py +41 -18
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/instance_options.py +2 -2
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/pyproject.toml +3 -3
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/__init__.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/akpool_commands.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/api.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/cli.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/config.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/dataset_commands.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/dataset_register.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/exporter.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/fs_commands.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/irepo_sdk.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/managed_ak.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/manifest_view.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/profile_commands.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/repo_read_guard.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/share_api.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/split_publish.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/tbb.py +0 -0
- {ap_client-0.5.2.dev0 → ap_client-0.5.2.dev2}/ap_client/waiter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ap-client
|
|
3
|
-
Version: 0.5.2.
|
|
3
|
+
Version: 0.5.2.dev2
|
|
4
4
|
Summary: Agent Platform API Client & CLI
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: irepo-artifact==0.2.1
|
|
@@ -10,9 +10,9 @@ Requires-Dist: rich>=13.0.0
|
|
|
10
10
|
Requires-Dist: typer>=0.9.0
|
|
11
11
|
Requires-Dist: websockets>=13.0
|
|
12
12
|
Provides-Extra: all
|
|
13
|
-
Requires-Dist: instance-repo[oss]<2.0.0,>=1.3.5.
|
|
13
|
+
Requires-Dist: instance-repo[oss]<2.0.0,>=1.3.5.dev2; extra == 'all'
|
|
14
14
|
Provides-Extra: dataset
|
|
15
|
-
Requires-Dist: instance-repo[oss]<2.0.0,>=1.3.5.
|
|
15
|
+
Requires-Dist: instance-repo[oss]<2.0.0,>=1.3.5.dev2; extra == 'dataset'
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
18
|
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.
|
|
@@ -477,7 +477,7 @@ def instance_get(
|
|
|
477
477
|
max_pages: int = typer.Option(50, "--max-pages", min=1, help="Maximum directory listing pages"),
|
|
478
478
|
output_format: str = typer.Option(None, "--format", help=_FORMAT_HELP),
|
|
479
479
|
):
|
|
480
|
-
"""Show instance metadata
|
|
480
|
+
"""Show instance metadata and root assets; use --path to browse a directory."""
|
|
481
481
|
from .irepo_sdk import _reason
|
|
482
482
|
|
|
483
483
|
output_format = _fmt(output_format)
|
|
@@ -525,17 +525,20 @@ def instance_get(
|
|
|
525
525
|
f"Failed to query instance {instance}: not found",
|
|
526
526
|
f"Check the instance id: ap instance list --dataset {dataset} --split {split}",
|
|
527
527
|
)
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
528
|
+
_list_instance_objects(
|
|
529
|
+
repo,
|
|
530
|
+
dataset,
|
|
531
|
+
resolved_version,
|
|
532
|
+
instance,
|
|
533
|
+
split,
|
|
534
|
+
"",
|
|
535
|
+
env,
|
|
536
|
+
_metadata_model_for_split(metadata_model, split=split),
|
|
537
|
+
page_size,
|
|
538
|
+
max_pages,
|
|
539
|
+
output_format,
|
|
540
|
+
metadata=_instance_record(record),
|
|
541
|
+
)
|
|
539
542
|
|
|
540
543
|
|
|
541
544
|
def _list_instance_objects(
|
|
@@ -550,6 +553,8 @@ def _list_instance_objects(
|
|
|
550
553
|
page_size: int,
|
|
551
554
|
max_pages: int,
|
|
552
555
|
output_format: str,
|
|
556
|
+
*,
|
|
557
|
+
metadata: dict | None = None,
|
|
553
558
|
) -> None:
|
|
554
559
|
from .irepo_sdk import _reason
|
|
555
560
|
|
|
@@ -585,12 +590,30 @@ def _list_instance_objects(
|
|
|
585
590
|
{key: _visible(value) if isinstance(value, str) else value for key, value in row.items()}
|
|
586
591
|
for row in rows
|
|
587
592
|
]
|
|
588
|
-
|
|
589
|
-
payload,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
593
|
+
if metadata is not None and output_format in ("json", "yaml"):
|
|
594
|
+
_emit_detail(dict(metadata, objects=payload), output_format)
|
|
595
|
+
else:
|
|
596
|
+
if metadata is not None:
|
|
597
|
+
manifest = metadata.get("manifest")
|
|
598
|
+
if isinstance(manifest, list):
|
|
599
|
+
from .manifest_view import manifest_lines
|
|
600
|
+
|
|
601
|
+
_emit_detail(
|
|
602
|
+
{key: value for key, value in metadata.items() if key != "manifest"},
|
|
603
|
+
output_format,
|
|
604
|
+
)
|
|
605
|
+
typer.echo()
|
|
606
|
+
for line in manifest_lines(manifest):
|
|
607
|
+
typer.echo(line)
|
|
608
|
+
else:
|
|
609
|
+
_emit_detail(metadata, output_format)
|
|
610
|
+
typer.echo("\nassets: .")
|
|
611
|
+
_emit(
|
|
612
|
+
payload,
|
|
613
|
+
rows,
|
|
614
|
+
(("type", "TYPE"), ("name", "NAME"), ("path", "PATH"), ("size_bytes", "BYTES")),
|
|
615
|
+
output_format,
|
|
616
|
+
)
|
|
594
617
|
if payload.get("truncated"):
|
|
595
618
|
typer.echo(
|
|
596
619
|
"warning: directory listing is incomplete; increase --max-pages and retry", err=True
|
|
@@ -79,9 +79,9 @@ def require_working_prune() -> None:
|
|
|
79
79
|
version = metadata.version("instance-repo")
|
|
80
80
|
except metadata.PackageNotFoundError:
|
|
81
81
|
return
|
|
82
|
-
if version
|
|
82
|
+
if version in {"1.3.5.dev1", "1.3.5.dev2"}:
|
|
83
83
|
raise ValueError(
|
|
84
|
-
"instance-repo
|
|
84
|
+
f"instance-repo {version} cannot complete --prune; upgrade to a fixed SDK before uploading"
|
|
85
85
|
)
|
|
86
86
|
|
|
87
87
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ap-client"
|
|
7
|
-
version = "0.5.2.
|
|
7
|
+
version = "0.5.2.dev2"
|
|
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"
|
|
@@ -19,10 +19,10 @@ dependencies = [
|
|
|
19
19
|
|
|
20
20
|
[project.optional-dependencies]
|
|
21
21
|
dataset = [
|
|
22
|
-
"instance-repo[oss]>=1.3.5.
|
|
22
|
+
"instance-repo[oss]>=1.3.5.dev2,<2.0.0",
|
|
23
23
|
]
|
|
24
24
|
all = [
|
|
25
|
-
"instance-repo[oss]>=1.3.5.
|
|
25
|
+
"instance-repo[oss]>=1.3.5.dev2,<2.0.0",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.scripts]
|
|
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
|