envloop-cli 1.27.0__py3-none-any.whl → 1.29.0__py3-none-any.whl

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 (38) hide show
  1. envloop/_optional.py +4 -4
  2. envloop/auth_cli.py +13 -11
  3. envloop/cli_errors.py +1 -1
  4. envloop/cli_output.py +2 -1
  5. envloop/lifecycle_cli.py +4 -4
  6. envloop/resource_cli.py +28 -28
  7. envloop/terminal.py +8 -5
  8. {envloop_cli-1.27.0.dist-info → envloop_cli-1.29.0.dist-info}/METADATA +4 -4
  9. envloop_cli-1.29.0.dist-info/RECORD +64 -0
  10. envloop_data/cli.py +14 -14
  11. envloop_data/cli_output.py +5 -4
  12. envloop_data/client.py +2 -2
  13. envloop_data/data.py +35 -35
  14. envloop_data/data_cli.py +18 -18
  15. envloop_data/data_publications.py +6 -6
  16. envloop_data/data_upload.py +1 -1
  17. envloop_data/http.py +2 -2
  18. envloop_data/navigation_resources.py +13 -11
  19. envloop_data/resource_cli.py +21 -21
  20. envloop_experiment/cli.py +54 -22
  21. envloop_experiment/client.py +11 -11
  22. envloop_experiment/decision.py +1 -1
  23. envloop_experiment/http.py +9 -9
  24. envloop_experiment/job_cost.py +12 -9
  25. envloop_experiment/job_spec_cli.py +36 -5
  26. envloop_experiment/resource_cli.py +5 -5
  27. envloop_experiment/resources.py +2 -2
  28. envloop_experiment/train.py +17 -12
  29. envloop_experiment/train_log_cli.py +1 -1
  30. envloop_experiment/train_metrics_cli.py +145 -0
  31. envloop_experiment/train_progress.py +1 -1
  32. envloop_experiment/train_runner_cli.py +1 -1
  33. envloop_rsi_loop/agent_runs.py +14 -19
  34. envloop_rsi_loop/cli.py +1 -1
  35. envloop_rsi_loop/cli_output.py +8 -8
  36. envloop_cli-1.27.0.dist-info/RECORD +0 -63
  37. {envloop_cli-1.27.0.dist-info → envloop_cli-1.29.0.dist-info}/WHEEL +0 -0
  38. {envloop_cli-1.27.0.dist-info → envloop_cli-1.29.0.dist-info}/entry_points.txt +0 -0
envloop/_optional.py CHANGED
@@ -16,11 +16,11 @@ from typing import Any, override
16
16
  FEATURES = {'data': 'envloop_data', 'experiment': 'envloop_experiment', 'rsi-loop': 'envloop_rsi_loop'}
17
17
  FEATURE_COMMANDS = {
18
18
  'data': {
19
- 'dataset': 'Discover datasets, revisions and tasks',
19
+ 'dataset': 'Discover Datasets, revisions and tasks',
20
20
  'data': 'Manage versioned Data resources and verified file downloads',
21
21
  'runner': 'Discover available Runner revisions',
22
- 'checkpoint': 'List and download saved training checkpoints',
23
- 'profile': 'Manage platform runtime profiles',
22
+ 'checkpoint': 'List and download saved training Checkpoints',
23
+ 'profile': 'Manage platform runtime Profiles',
24
24
  },
25
25
  'experiment': {
26
26
  'job': 'Submit and manage Agent, Sandbox, Train and Inference Jobs',
@@ -30,7 +30,7 @@ FEATURE_COMMANDS = {
30
30
 
31
31
  MODULES: dict[str, str] = {
32
32
  **dict.fromkeys('data data_publications data_upload data_cli profile_updates recipes'.split(), 'data'),
33
- **dict.fromkeys('train train_progress train_runner_cli train_log_cli job_logs job_cost inference decision sandbox runtime_params job_spec_cli training'.split(), 'experiment'),
33
+ **dict.fromkeys('train train_progress train_metrics_cli train_runner_cli train_log_cli job_logs job_cost inference decision sandbox runtime_params job_spec_cli training'.split(), 'experiment'),
34
34
  **dict.fromkeys('agent_runs rsi_cli'.split(), 'rsi-loop'),
35
35
  }
36
36
  CLIENTS = {
envloop/auth_cli.py CHANGED
@@ -8,6 +8,8 @@ from typing import Any, cast
8
8
  from .config import ConfigError, ConfigStore, normalize_url, validate_key
9
9
 
10
10
  DEFAULT_BASE_URL = "https://api.envloop.ai"
11
+ CONFIG_FIELDS = ["base-url", "api-key", "workspace-id", "project-id"]
12
+ FIELD_HELP = "One of " + ", ".join(CONFIG_FIELDS)
11
13
 
12
14
 
13
15
  def add_auth_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
@@ -23,29 +25,29 @@ def add_auth_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParse
23
25
  actions = configure.add_subparsers(dest="config_action")
24
26
  init = actions.add_parser("init", help="Configure interactively with masked API key input")
25
27
  init.add_argument("--no-check", action="store_true", default=argparse.SUPPRESS, help="Save without API verification (offline)")
26
- project = actions.add_parser("project", help="Select and verify a project with its own API key")
27
- project.add_argument("project_id", nargs="?", help="Project ID; omit for an interactive list with names and IDs")
28
- project.add_argument("--stdin", action="store_true", help="Read the selected project's API key from stdin")
28
+ project = actions.add_parser("project", help="Select and verify a Project with its own API key")
29
+ project.add_argument("project_id", metavar="PROJECT_ID", nargs="?", help="Project ID; omit for an interactive list with names and IDs")
30
+ project.add_argument("--stdin", action="store_true", help="Read the selected Project's API key from stdin")
29
31
  setting = actions.add_parser("set", help="Save one field (API key is masked or read from stdin)")
30
- setting.add_argument("field", choices=["base-url", "api-key", "workspace-id", "project-id"])
31
- setting.add_argument("value", nargs="?", help=f"Base URL (default: {DEFAULT_BASE_URL}) or workspace ID; API keys use masked input or --stdin")
32
+ setting.add_argument("field", metavar="FIELD", choices=CONFIG_FIELDS, help=FIELD_HELP)
33
+ setting.add_argument("value", metavar="VALUE", nargs="?", help=f"Base URL (default: {DEFAULT_BASE_URL}) or Workspace ID; API keys use masked input or --stdin")
32
34
  setting.add_argument("--stdin", action="store_true", help="Read a single API key from stdin")
33
35
  setting.add_argument("--no-check", action="store_true", default=argparse.SUPPRESS, help="Save API key without verification (offline)")
34
36
  getting = actions.add_parser("get", help="Read saved configuration; never export an API key")
35
- getting.add_argument("field", choices=["base-url", "api-key", "workspace-id", "project-id"])
37
+ getting.add_argument("field", metavar="FIELD", choices=CONFIG_FIELDS, help=FIELD_HELP)
36
38
  actions.add_parser("path", help="Print configuration and credential file paths")
37
39
  show = actions.add_parser("show", help="Show saved and effective settings without revealing keys")
38
40
  show.add_argument("--json", action="store_true")
39
41
  remove = actions.add_parser("unset", help="Delete a saved field; does not revoke the server key")
40
- remove.add_argument("field", choices=["base-url", "api-key", "workspace-id", "project-id"])
42
+ remove.add_argument("field", metavar="FIELD", choices=CONFIG_FIELDS, help=FIELD_HELP)
41
43
  status = commands.add_parser("status", help="Inspect local credentials; --check verifies read access")
42
44
  status.add_argument("--check", action="store_true", help="Make a read-only request to the effective Base URL")
43
45
  status.add_argument("--json", action="store_true")
44
46
  commands.add_parser("logout", help="Remove the saved key for the stored default Base URL (local only)")
45
- workspace = commands.add_parser("workspace", help="Select and verify the active workspace")
46
- workspace.add_argument("workspace_id", nargs="?", help="Workspace ID; omit for an interactive list")
47
- workspace.add_argument("--project-id", help="Project within the workspace; its own API key is required")
48
- workspace.add_argument("--stdin", action="store_true", help="Read the selected workspace's API key from stdin")
47
+ workspace = commands.add_parser("workspace", help="Select and verify the active Workspace")
48
+ workspace.add_argument("workspace_id", metavar="WORKSPACE_ID", nargs="?", help="Workspace ID; omit for an interactive list")
49
+ workspace.add_argument("--project-id", help="Project within the Workspace; its own API key is required")
50
+ workspace.add_argument("--stdin", action="store_true", help="Read the selected Workspace's API key from stdin")
49
51
 
50
52
 
51
53
  def _key_from_input(stdin: bool = False) -> str:
envloop/cli_errors.py CHANGED
@@ -182,7 +182,7 @@ TASK_REQUEST_CONFLICT TEMPORARY_DEPENDENCY_REQUIRES_RETAIN TEMPORARY_RESOURCE_RE
182
182
  TEMPORARY_SCOPE_CONFLICT TEMPORARY_SCOPE_EXPIRED TRIAL_IDEMPOTENCY_CONFLICT TRIAL_VERSION_CONFLICT USAGE_EVENT_CONFLICT
183
183
  PROFILE_CORRUPT ADAPTER_STORAGE_UNAVAILABLE INSUFFICIENT_BALANCE METHOD_NOT_ALLOWED REQUEST_TOO_LARGE
184
184
  BATCH_POLICY_NOT_APPROVED BATCH_PROVIDER_UNAVAILABLE CHECKPOINT_ACCESS_DENIED CHECKPOINT_DOWNLOAD_UNAVAILABLE
185
- CHECKPOINT_MANAGEMENT_UNAVAILABLE CHECKPOINT_MANAGEMENT_UNSUPPORTED CHECKPOINT_NOT_DURABLE CHECKPOINT_RUN_REQUIRED
185
+ CHECKPOINT_MANAGEMENT_UNAVAILABLE CHECKPOINT_MANAGEMENT_UNSUPPORTED CHECKPOINT_NOT_DURABLE CHECKPOINT_TRIAL_REQUIRED
186
186
  CHECKPOINT_SIGNER_UNAVAILABLE INVALID_CHECKPOINT_CURSOR INVALID_CHECKPOINT_TTL INVALID_CHECKPOINT_VISIBILITY
187
187
  INVALID_EXECUTION_CONFIG INVALID_METRICS_RANGE INVALID_TRAIN_JOB_CURSOR INVALID_TRAIN_JOB_LIST_LIMIT
188
188
  INVALID_TRAIN_JOB_METADATA INVALID_TRAIN_JOB_SPEC INVALID_TRAIN_JOB_STATUS LOG_RETENTION_EXPIRED
envloop/cli_output.py CHANGED
@@ -38,7 +38,8 @@ def table(headers: Sequence[object], rows: Sequence[Sequence[object]]) -> str:
38
38
 
39
39
 
40
40
  def timestamp(value: object) -> str:
41
- return compact_time(value, local=True)
41
+ """Table and summary times: UTC to seconds, labelled; --json keeps the original value."""
42
+ return compact_time(value, utc=True)
42
43
 
43
44
 
44
45
  def next_page(args: argparse.Namespace, cursor: object, program: str) -> str:
envloop/lifecycle_cli.py CHANGED
@@ -6,7 +6,7 @@ from typing import Any
6
6
 
7
7
 
8
8
  def wait_options(parser: argparse.ArgumentParser):
9
- parser.add_argument('--wait', action='store_true', help='Wait for the persisted cleanup operation')
9
+ parser.add_argument('--wait', action='store_true', help='Wait for the persisted cleanup Operation')
10
10
  parser.add_argument('--timeout-seconds', type=float, default=600)
11
11
 
12
12
 
@@ -14,10 +14,10 @@ def add_management_commands(settings: "argparse._SubParsersAction[argparse.Argum
14
14
  operations = settings.add_parser('operation', help='Inspect or retry persisted cleanup').add_subparsers(dest='operation_action', required=True)
15
15
  for action in ('get', 'retry', 'wait'):
16
16
  command = operations.add_parser(action)
17
- command.add_argument('identifier')
17
+ command.add_argument('identifier', metavar='OPERATION_ID')
18
18
  if action == 'wait':
19
19
  command.add_argument('--timeout-seconds', type=float, default=600)
20
- cleanup = settings.add_parser('cleanup', help='Clean an explicit set of project resource IDs')
20
+ cleanup = settings.add_parser('cleanup', help='Clean an explicit set of Project resource IDs')
21
21
  cleanup.add_argument('--file', type=Path, required=True, help='JSON array of resource kind and ID objects')
22
22
  cleanup.add_argument('--request-id', required=True)
23
23
  wait_options(cleanup)
@@ -27,7 +27,7 @@ def add_management_commands(settings: "argparse._SubParsersAction[argparse.Argum
27
27
  create.add_argument('--request-id', required=True)
28
28
  for action in ('get', 'cleanup', 'retain'):
29
29
  command = scopes.add_parser(action)
30
- command.add_argument('identifier')
30
+ command.add_argument('identifier', metavar='RESOURCE_SCOPE_ID')
31
31
  if action == 'cleanup':
32
32
  wait_options(command)
33
33
  if action == 'retain':
envloop/resource_cli.py CHANGED
@@ -17,10 +17,10 @@ def listing(commands: "argparse._SubParsersAction[argparse.ArgumentParser]", *,
17
17
 
18
18
 
19
19
  def add_resource_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
20
- dashboard = groups.add_parser('dashboard', help='Inspect the current project overview').add_subparsers(dest='action', required=True)
21
- dashboard.add_parser('get', help='Show project details and recent experiment pages')
20
+ dashboard = groups.add_parser('dashboard', help='Inspect the current Project overview').add_subparsers(dest='action', required=True)
21
+ dashboard.add_parser('get', help='Show Project details and recent experiment pages')
22
22
 
23
- billing = groups.add_parser('billing', help='Inspect project billing and recorded usage').add_subparsers(dest='resource', required=True)
23
+ billing = groups.add_parser('billing', help='Inspect Project billing and recorded usage').add_subparsers(dest='resource', required=True)
24
24
  for resource in ('account', 'usage', 'ledger', 'price'):
25
25
  commands = billing.add_parser(resource, help=f'Inspect billing {resource}').add_subparsers(dest='action', required=True)
26
26
  command = commands.add_parser('get', help='Show the billing account') if resource == 'account' else listing(commands, paged=False)
@@ -31,27 +31,27 @@ def add_resource_commands(groups: "argparse._SubParsersAction[argparse.ArgumentP
31
31
  if resource == 'ledger':
32
32
  command.add_argument('--limit', type=int, default=25)
33
33
 
34
- limits = groups.add_parser('limit', help='Inspect project resource limits').add_subparsers(dest='action', required=True)
34
+ limits = groups.add_parser('limit', help='Inspect Project resource limits').add_subparsers(dest='action', required=True)
35
35
  limits.add_parser('get', help='Read effective execution limits, compose Runner state and the registry credential '
36
36
  'count (read-only)')
37
- members = groups.add_parser('member', help='Manage project members subject to server authorization').add_subparsers(dest='action', required=True)
37
+ members = groups.add_parser('member', help='Manage Project members subject to server authorization').add_subparsers(dest='action', required=True)
38
38
  listing(members, paged=False)
39
- candidates = members.add_parser('candidate', help='Find eligible project members').add_subparsers(dest='candidate_action', required=True)
40
- listing(candidates, paged=False, help='List eligible project members matching a query').add_argument('--query', required=True)
39
+ candidates = members.add_parser('candidate', help='Find eligible Project members').add_subparsers(dest='candidate_action', required=True)
40
+ listing(candidates, paged=False, help='List eligible Project members matching a query').add_argument('--query', required=True)
41
41
  for action in ('add', 'update', 'remove'):
42
- command = members.add_parser(action, help=f'{action.capitalize()} a project membership (human-session authorization required)')
43
- command.add_argument('user_id')
42
+ command = members.add_parser(action, help=f'{action.capitalize()} a Project membership (human-session authorization required)')
43
+ command.add_argument('user_id', metavar='USER_ID')
44
44
  if action != 'remove':
45
45
  command.add_argument('--role', choices=['viewer', 'developer', 'admin'], default='developer')
46
46
  command.add_argument('--expected-version', required=True, type=int, help='Current membership version; use 0 for a new grant')
47
47
 
48
- settings = groups.add_parser('setting', help='Inspect and update the current project settings').add_subparsers(dest='action', required=True)
49
- settings.add_parser('get', help='Show current project settings')
50
- update = settings.add_parser('update', help='Change project fields (human-session authorization required)')
48
+ settings = groups.add_parser('setting', help='Inspect and update the current Project settings').add_subparsers(dest='action', required=True)
49
+ settings.add_parser('get', help='Show current Project settings')
50
+ update = settings.add_parser('update', help='Change Project fields (human-session authorization required)')
51
51
  for field in ('name', 'slug', 'region'):
52
52
  update.add_argument('--' + field)
53
53
  update.add_argument('--expected-version', required=True, type=int)
54
- archive = settings.add_parser('archive', help='Archive the project (human-session authorization required)')
54
+ archive = settings.add_parser('archive', help='Archive the Project (human-session authorization required)')
55
55
  archive.add_argument('--expected-version', required=True, type=int)
56
56
  from .lifecycle_cli import add_management_commands
57
57
  add_management_commands(settings)
@@ -89,40 +89,40 @@ def _revision(value: str) -> str:
89
89
 
90
90
  def add_self_service_commands(settings: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
91
91
  """Project Admin settings that also work with an API key whose ceiling includes them."""
92
- registry = settings.add_parser('registry', help='Manage private registry credentials for this project\'s images'
92
+ registry = settings.add_parser('registry', help='Manage private registry credentials for this Project\'s images'
93
93
  ).add_subparsers(dest='registry_action', required=True)
94
94
  listing(registry, paged=False, help='List registry credentials (metadata only; secrets are write-only)')
95
- add = registry.add_parser('add', help='Register a write-only registry credential (project Admin)')
95
+ add = registry.add_parser('add', help='Register a write-only registry credential (Project Admin)')
96
96
  add.add_argument('--registry', required=True, help='Registry host, for example ghcr.io')
97
97
  add.add_argument('--repository-prefix', required=True, help='Repository prefix the credential covers, for example my-org')
98
98
  add.add_argument('--username', required=True)
99
99
  add.add_argument('--password-stdin', action='store_true',
100
100
  help='Read the token or password from stdin; without it you are prompted (no echo)')
101
101
  add.add_argument('--password', '--token', nargs='?', action=_RejectSecretArgument, help=argparse.SUPPRESS)
102
- remove = registry.add_parser('remove', help='Remove a credential; later image pulls no longer receive it (project Admin)')
103
- remove.add_argument('credential_id')
104
- compose = settings.add_parser('compose', help='Compose Runner (multi-container Task) access for this project'
102
+ remove = registry.add_parser('remove', help='Remove a credential; later image pulls no longer receive it (Project Admin)')
103
+ remove.add_argument('credential_id', metavar='CREDENTIAL_ID')
104
+ compose = settings.add_parser('compose', help='Compose Runner (multi-container Task) access for this Project'
105
105
  ).add_subparsers(dest='compose_action', required=True)
106
106
  compose.add_parser('get', help='Show the effective state, the reason and the platform bounds')
107
- compose.add_parser('enable', help='Request compose Runners; the platform policy may need operator approval (project Admin)')
108
- compose.add_parser('disable', help='Withdraw this project\'s compose Runner request (project Admin)')
109
- concurrency = settings.add_parser('concurrency', help='Concurrent Trial limit of this project'
107
+ compose.add_parser('enable', help='Request compose Runners; the platform policy may need operator approval (Project Admin)')
108
+ compose.add_parser('disable', help='Withdraw this Project\'s compose Runner request (Project Admin)')
109
+ concurrency = settings.add_parser('concurrency', help='Concurrent Trial limit of this Project'
110
110
  ).add_subparsers(dest='concurrency_action', required=True)
111
- command = concurrency.add_parser('set', help='Lower the project limit below the operator ceiling, or none to clear it '
112
- '(project Admin)')
111
+ command = concurrency.add_parser('set', help='Lower the Project limit below the operator ceiling, or none to clear it '
112
+ '(Project Admin)')
113
113
  command.add_argument('value', type=_concurrency, metavar='VALUE', help='1..10000 or none')
114
- model = settings.add_parser('model-access', help='Metered model access for published Runners of this project'
114
+ model = settings.add_parser('model-access', help='Metered model access for published Runners of this Project'
115
115
  ).add_subparsers(dest='model_access_action', required=True)
116
116
  listing(model, paged=False, help='List grants and whether the platform can deliver them now')
117
- grant = model.add_parser('grant', help='Let one published Runner receive the project\'s metered model key on Fly '
118
- 'Trials (project Admin)')
117
+ grant = model.add_parser('grant', help='Let one published Runner receive the Project\'s metered model key on Fly '
118
+ 'Trials (Project Admin)')
119
119
  grant.add_argument('runner', type=_runner_name, metavar='NAMESPACE/NAME', help='Published Runner name')
120
120
  grant.add_argument('--protocol', dest='protocols', action='append', choices=['anthropic', 'openai'], required=True,
121
121
  help='Model protocol to grant; repeat for both')
122
122
  grant.add_argument('--revision', type=_revision, help='Limit the grant to one full commit Revision')
123
123
  revoke = model.add_parser('revoke', help='Revoke a grant; Trials that have not started no longer get the key '
124
- '(project Admin)')
125
- revoke.add_argument('grant_id')
124
+ '(Project Admin)')
125
+ revoke.add_argument('grant_id', metavar='GRANT_ID')
126
126
 
127
127
 
128
128
  def _read_secret(args: argparse.Namespace) -> str:
envloop/terminal.py CHANGED
@@ -6,7 +6,7 @@ import sys
6
6
  import unicodedata
7
7
  from contextlib import contextmanager
8
8
  from contextvars import ContextVar
9
- from datetime import datetime
9
+ from datetime import datetime, timezone
10
10
  from typing import Any, TextIO
11
11
 
12
12
  _NO_COLOR = ContextVar("envloop_cli_no_color", default=False)
@@ -47,15 +47,18 @@ def status_text(text: str) -> str:
47
47
  return style(text, code) if code else text
48
48
 
49
49
 
50
- def compact_time(value: Any, *, local: bool = False) -> Any:
51
- """Render aware times to seconds; preserve unknown or timezone-free values."""
50
+ def compact_time(value: Any, *, utc: bool = False) -> Any:
51
+ """Render aware times to seconds; preserve unknown or timezone-free values.
52
+
53
+ ``utc`` converts to UTC and labels it, so a table read on any machine means the same instant.
54
+ """
52
55
  if not isinstance(value, str):
53
56
  return value
54
57
  try:
55
58
  parsed = datetime.fromisoformat(value.replace("Z", "+00:00"))
56
59
  if parsed.tzinfo is not None:
57
- if local:
58
- parsed = parsed.astimezone()
60
+ if utc:
61
+ return parsed.astimezone(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC")
59
62
  return parsed.strftime("%Y-%m-%d %H:%M:%S")
60
63
  except ValueError:
61
64
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: envloop-cli
3
- Version: 1.27.0
3
+ Version: 1.29.0
4
4
  Summary: EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference
5
5
  Project-URL: Homepage, https://envloop.ai
6
6
  Project-URL: Documentation, https://docs.envloop.ai
@@ -226,8 +226,8 @@ Choose a published Runner readable in your project. Save this request as `gpu-ru
226
226
  {
227
227
  "request_id": "gpu-run-001",
228
228
  "trials": [
229
- {"name": "first", "spec": {"runner": "envloop/bash@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}},
230
- {"name": "second", "spec": {"runner": "envloop/bash@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}}
229
+ {"name": "first", "spec": {"runner": "envloop/bash@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_seconds": 600}},
230
+ {"name": "second", "spec": {"runner": "envloop/bash@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_seconds": 600}}
231
231
  ]
232
232
  }
233
233
  ```
@@ -272,7 +272,7 @@ with Client.remote() as client:
272
272
  ```
273
273
 
274
274
  Use the exact model returned by the Job. The SDK forwards the payload to the
275
- Job's `/Inference/decision` API; the approved plugin validates its business fields.
275
+ Job's `/inference/decision` API; the approved plugin validates its business fields.
276
276
  Availability requires matching platform support and approved content in your project.
277
277
 
278
278
  ## ANS data and verified downloads
@@ -0,0 +1,64 @@
1
+ envloop/__init__.py,sha256=tX06Gh2EmufRr0J_3YKtjDeNrJ30auR3y3BJ3N3FHJY,421
2
+ envloop/_optional.py,sha256=d2Ebq9g0JTKjiq3fuGobG4XjXc6MCogZ5X7uXQDaqak,8981
3
+ envloop/auth_cli.py,sha256=Ve7G9AHNsO-zvWNrUgcKiVCTgXKvHYRHjnnhoeTstmE,15448
4
+ envloop/auth_login.py,sha256=PBdgIO_GJ6nMVisWdbGBW1NL2gMV73t1Fao4q3aWvLs,6973
5
+ envloop/auth_workspace.py,sha256=g92Dok4eSp6P-Du5qkwzZG4JDeSrdYTXJbn5WCzCFMo,14927
6
+ envloop/cli.py,sha256=Vafivql1JBrlIrfJOD-XAw6AevQKIasmvDHmcazIzqo,15010
7
+ envloop/cli_errors.py,sha256=ff_9Bw1pPGUrJqxspstF2NcwA_YJAKclI4WzDv_C0vs,30789
8
+ envloop/cli_output.py,sha256=UkcEMqxpzMUSYaxTQMJR1WQ8nqsoq-piPNyPrCMR5dQ,6025
9
+ envloop/client.py,sha256=TdTUhHwtK0FL6xzIz4moaNdIPlC-TkisPvU4zNPnaTA,3270
10
+ envloop/config.py,sha256=1Wr2lNdNNZzsQDPNGsk-TsnEUvDqOtocy9TgUpmOZO0,22494
11
+ envloop/downloads.py,sha256=ktL-hz9HWPGNuQX_N5RmLyt16qbooArljW9z80XYmTo,3253
12
+ envloop/http.py,sha256=2mu5yIgQDESC0y2LvdE53d7fPfSzT0oXVjlY25qwGkY,16479
13
+ envloop/lifecycle_cli.py,sha256=eKK0mP1yXBmmuEpzafNPRoSQjyluGIxcSYGPfr07Rr0,3179
14
+ envloop/navigation_resources.py,sha256=3PeZiYtXHXPMwuCLRdw1mUnZDTDJUYthUhsiJkHtI_g,10378
15
+ envloop/profile_secrets.py,sha256=5QpHRV_Gy1MxObR62SX4nNblqk7gWqQZNtzy6wZNV0s,6325
16
+ envloop/resource_cli.py,sha256=JUMpptd3VvCas0D3cdS5p8_iHVCkiaiIqqGLeFdCnws,13371
17
+ envloop/resources.py,sha256=V5nDuM8QgE52V9slSj2ywmhZqwgMKFosm4o5naFaEJo,3025
18
+ envloop/terminal.py,sha256=AtScg4nUo6wMQO7LNCnypUV9wWB62baBXO7YGpA3jV8,2771
19
+ envloop/utils/__init__.py,sha256=huB3qPQuKNr3JxfH3Ys09YWFtHiDamCHFsBa4epANgQ,25
20
+ envloop/utils/logging.py,sha256=rXN0qyxhfGEq4vWXxjwfaczPPZf_7atnOkkBTgNNRPc,1017
21
+ envloop_data/__init__.py,sha256=nKDGmzFNAQv2mq16YijiI3Q-gDL_smNyZD-AQaqoz7Y,68
22
+ envloop_data/cli.py,sha256=5J_pS5jf65gyaRpE2EV4jDfDUZ1oEsK0iHAmhJlk-oU,9023
23
+ envloop_data/cli_output.py,sha256=3ZuAXJiXs1wVxIthHMpRgn-VVC4PatSUAWZDCgldrhQ,4414
24
+ envloop_data/client.py,sha256=M1NxvQiiNWq3CByW7AehEOfpkfBrC7ysSDAPkeccCaA,12515
25
+ envloop_data/data.py,sha256=VWmdQbOlXOaQZdPqcTQLk0Di0HeMSLARxAfntwh2RWo,27610
26
+ envloop_data/data_cli.py,sha256=diizoF2iVpNQmK6cCVF14ygkZ4OWMCB3IV1y2mLLkQI,13437
27
+ envloop_data/data_publications.py,sha256=_Z64X9CCHz1c2AhtcbRIQuROiJ2jTLw6dA3nn1PyHek,6885
28
+ envloop_data/data_upload.py,sha256=b9hf-MwWHtrZW-9U9WyxJxX89SRsEHXCPcSQIy6SVMM,14270
29
+ envloop_data/http.py,sha256=adbMFCUsS1YYanzdCoqM4HIgIOxjgXoHKOkxSwUuvW4,6726
30
+ envloop_data/navigation_resources.py,sha256=V3JtSXYqXk1e0ke1nEdBHcZtUHNqHu9mJd4BfN9y4zg,12553
31
+ envloop_data/profile_updates.py,sha256=FB3Huf0AIlqg6CUC0TcrEeWCF5GH1Z6iJN5Wkq8KcYg,3126
32
+ envloop_data/recipes.py,sha256=JH0bvM0LCH_iN4p4ONfTSF53eSHAVLUQNFLueOx07UA,1301
33
+ envloop_data/resource_cli.py,sha256=w4HgMqCx9_72kdimKUCT9B7lX2itHJJcJyvT8zdTfyI,7137
34
+ envloop_data/runner_packages.py,sha256=Xi50hZbdoew9DJ8iYQevMo2jv3qgR3iT50wtV04rFfQ,3424
35
+ envloop_experiment/__init__.py,sha256=nKDGmzFNAQv2mq16YijiI3Q-gDL_smNyZD-AQaqoz7Y,68
36
+ envloop_experiment/cli.py,sha256=9FDpy6cSXy2OWpm4kpoV7gKWK4qqTMcraYGR8346Rz8,30685
37
+ envloop_experiment/cli_output.py,sha256=-FojsqOMIIQuOnfhk2AaqMtwUz5skoWvLeNASm8An6Y,2689
38
+ envloop_experiment/client.py,sha256=VKKqI9IDazxaN7-coP48DvXcz6SqjZ8ScM4O6plBNWI,25122
39
+ envloop_experiment/decision.py,sha256=HJTj-jSJJ5kcxQQzFXwrA9IICWXA6zSNBFL9EbbrxqI,918
40
+ envloop_experiment/http.py,sha256=A_PHWVr7PV4eiP30lXmOITiljXf6GEIYGkJlr1KFz-Q,6110
41
+ envloop_experiment/inference.py,sha256=74MZDs0lqqqNwgdvj58rs-D3emDj4iHv1W-copc5PYA,2134
42
+ envloop_experiment/job_cost.py,sha256=gZB69-pdsJM4wManw44AIS9T3ZtsxxQTqrJs-cHjwJU,2214
43
+ envloop_experiment/job_logs.py,sha256=RLipbj89e5hQdBeXtszsxSYYw7By1hscwSTGFQzQ3Qw,1340
44
+ envloop_experiment/job_spec_cli.py,sha256=qyt0hZMAVqOCoRSzEuO2mQ8f8ro5cLiY5eRdAWGQbOM,9753
45
+ envloop_experiment/navigation_resources.py,sha256=xoI4VFmd0dzviKvzndwKAoWdfbaL_f50cnXRxPkfoo4,1832
46
+ envloop_experiment/resource_cli.py,sha256=MCFWHl4iCNe1UiGyHcvMM67LOHQ7MZl3joFtftQwqLk,2083
47
+ envloop_experiment/resources.py,sha256=4guXzssv7XhYkn8ESH-79DIMWUyKDIg70uOa-KoNvp0,7236
48
+ envloop_experiment/runtime_params.py,sha256=ITF6hDuhfdChnWo3e8NW27WxEoNoCuOTww-Hz60zqQU,3608
49
+ envloop_experiment/sandbox.py,sha256=sTpAWbcs2jAPfb7gILK4MTJSmcpSeZG3anFkLA5TgdQ,1274
50
+ envloop_experiment/train.py,sha256=S0nkTjfbXJnDL1uxPeOIcfHF3Zxc3jqO6O2_UcNjcr0,5472
51
+ envloop_experiment/train_log_cli.py,sha256=lQXOgFPwE7E88FUl9IfK5P4N7z5dCzWQL2aQyzpFOu0,6368
52
+ envloop_experiment/train_metrics_cli.py,sha256=43yqdMqWkbxkeRnGG6U6YQXibyEBxWLPB58fzf8ZqPY,6385
53
+ envloop_experiment/train_progress.py,sha256=XrF6g1XNtGReuIfFdfXTvD4XwvS-bDcFZNHzTCCfYa0,2546
54
+ envloop_experiment/train_runner_cli.py,sha256=OiHv7Dp2VPoQVmFR0vgJoAd5Ni0uQvtCyNf5Lk4AFfc,3154
55
+ envloop_experiment/training/__init__.py,sha256=IEQWbCHe-zZ2e7JQxOrFOdYlSQxMfOceCZUf_KeszBk,221
56
+ envloop_rsi_loop/__init__.py,sha256=nKDGmzFNAQv2mq16YijiI3Q-gDL_smNyZD-AQaqoz7Y,68
57
+ envloop_rsi_loop/agent_runs.py,sha256=GrXSfnQ8MchA9i8UI3LWJiTninpI0PeTm0hgz2TJ0No,10729
58
+ envloop_rsi_loop/cli.py,sha256=Kqearg20Mvfyj62r2mibVdWEMo1NHjthgvS-Tl7SC-A,3047
59
+ envloop_rsi_loop/cli_output.py,sha256=GxM4UiL4NzzSyjRrikai6ROW-1WPjFtwrIfpnE8GZ4U,3173
60
+ envloop_rsi_loop/rsi_cli.py,sha256=e9XHeIPwMz1dZ6NhK3UIETCdy7LbIWgFosF1FnKVUQk,2580
61
+ envloop_cli-1.29.0.dist-info/METADATA,sha256=E_y-GPapWXuAMh2YdNQU0c2X1G5gZx3M_jxDPJGdXtg,15656
62
+ envloop_cli-1.29.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
63
+ envloop_cli-1.29.0.dist-info/entry_points.txt,sha256=8aXOpgtVk4GndhChA4XNecShkb1w0xGHBHrKla78ofI,67
64
+ envloop_cli-1.29.0.dist-info/RECORD,,
envloop_data/cli.py CHANGED
@@ -79,10 +79,10 @@ def secret_option(command: argparse.ArgumentParser) -> None:
79
79
 
80
80
 
81
81
  def add_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
82
- profiles = groups.add_parser("profile", help="Manage platform runtime profiles").add_subparsers(dest="action", required=True)
82
+ profiles = groups.add_parser("profile", help="Manage platform runtime Profiles").add_subparsers(dest="action", required=True)
83
83
  put = profiles.add_parser("create", help="Create an immutable Profile version from TOML or JSON")
84
- put.add_argument("name")
85
- put.add_argument("version")
84
+ put.add_argument("name", metavar="NAME")
85
+ put.add_argument("version", metavar="VERSION")
86
86
  put.add_argument("--file", type=Path, required=True, help="Profile TOML or JSON file")
87
87
  put.add_argument("--runner", metavar="RUNNER", help="Bind a Runner revision to this version")
88
88
  secret_input = put.add_mutually_exclusive_group()
@@ -90,8 +90,8 @@ def add_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]")
90
90
  secret_input.add_argument("--model-api-key-stdin", action="store_true", help="Read the model API key from one line of standard input")
91
91
  secret_option(put)
92
92
  update = profiles.add_parser("update", help="Edit an existing Profile by publishing a new immutable version")
93
- update.add_argument("name")
94
- update.add_argument("version", help="New version; existing versions cannot be overwritten")
93
+ update.add_argument("name", metavar="NAME")
94
+ update.add_argument("version", metavar="VERSION", help="New version; existing versions cannot be overwritten")
95
95
  update.add_argument("--from-version", help="Source version; omit to use default, then newest unarchived creation")
96
96
  update.add_argument("--file", type=Path, required=True, help="TOML or JSON patch: merge params keys, replace supplied metadata; preserve omitted fields")
97
97
  update.add_argument("--runner", metavar="RUNNER", help="Bind a Runner revision; v1 requires a full commit; omit to preserve the source binding")
@@ -100,13 +100,13 @@ def add_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]")
100
100
  update_secret.add_argument("--model-api-key-stdin", action="store_true", help="Read an encrypted model connection key from one line of standard input")
101
101
  secret_option(update)
102
102
  fork = profiles.add_parser('fork', help='Fork an existing Profile into a new immutable identity')
103
- fork.add_argument('source_name')
104
- fork.add_argument('source_version')
105
- fork.add_argument('name')
106
- fork.add_argument('version')
103
+ fork.add_argument('source_name', metavar='SOURCE_NAME')
104
+ fork.add_argument('source_version', metavar='SOURCE_VERSION')
105
+ fork.add_argument('name', metavar='NAME')
106
+ fork.add_argument('version', metavar='VERSION')
107
107
  secret_option(fork)
108
108
  get = profiles.add_parser("get")
109
- get.add_argument("name")
109
+ get.add_argument("name", metavar="NAME")
110
110
  get.add_argument("--version")
111
111
  listing = profiles.add_parser("list")
112
112
  listing.add_argument("--name")
@@ -115,13 +115,13 @@ def add_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]")
115
115
  listing.add_argument("--cursor")
116
116
  listing.add_argument("--json", action="store_true", help="Output the complete response as JSON (default: table)")
117
117
  default = profiles.add_parser("set-default")
118
- default.add_argument("name")
119
- default.add_argument("version")
118
+ default.add_argument("name", metavar="NAME")
119
+ default.add_argument("version", metavar="VERSION")
120
120
  default.add_argument("--expected-version", help="Omit only when no default exists")
121
121
  for command in ("archive", "export"):
122
122
  item = profiles.add_parser(command)
123
- item.add_argument("name")
124
- item.add_argument("version")
123
+ item.add_argument("name", metavar="NAME")
124
+ item.add_argument("version", metavar="VERSION")
125
125
  from envloop_data.resource_cli import add_resource_commands
126
126
  add_resource_commands(groups)
127
127
 
@@ -38,9 +38,10 @@ def list_layout(items: list[dict[str, Any]], args: argparse.Namespace) -> tuple[
38
38
  render = dataset_row
39
39
  empty = 'No datasets found.'
40
40
  elif args.group == 'checkpoint':
41
- headers = ('CHECKPOINT ID', 'TYPE', 'MODEL', 'TRAIN JOB ID', 'URI')
42
- render = lambda item: (item.get('checkpoint_id'), item.get('checkpoint_type'), item.get('base_model'),
43
- item.get('job_id') or item.get('train_job_id'), item.get('uri'))
41
+ # The checkpoint ID is the resource_id (cp_…); the save name (adapter-final) repeats across Jobs.
42
+ headers = ('CHECKPOINT ID', 'NAME', 'TYPE', 'MODEL', 'JOB ID', 'URI')
43
+ render = lambda item: (item.get('resource_id'), item.get('checkpoint_id'), item.get('checkpoint_type'),
44
+ item.get('base_model'), item.get('job_id'), item.get('uri'))
44
45
  empty = 'No checkpoints found.'
45
46
  elif args.group == "profile" and args.name is None:
46
47
  headers = ("NAME", "VERSIONS", "DEFAULT", "UPDATED AT")
@@ -64,7 +65,7 @@ def pagination(command: list[str], args: argparse.Namespace, cursor: object) ->
64
65
  command.extend(['--limit', str(args.limit), '--cursor=' + str(cursor)])
65
66
  fields = {'dataset': ('type', 'query'),
66
67
  'data': ('type', 'ref', 'job_id', 'trial_id'),
67
- 'checkpoint': ('job_id', 'run_id'), 'profile': ('name',)}
68
+ 'checkpoint': ('job_id', 'trial_id'), 'profile': ('name',)}
68
69
  for field in fields.get(args.group, ()):
69
70
  if getattr(args, field, None) is not None:
70
71
  if field == 'query':
envloop_data/client.py CHANGED
@@ -194,7 +194,7 @@ class Runners:
194
194
  source_ref_kind: str = 'branch', dry_run: bool = False):
195
195
  """Publish a Runner package directory as the immutable revision NAME@REVISION.
196
196
 
197
- This is `client.data.create(kind='runner', ...)` with the native manifest built
197
+ This is `client.data.create(type='runner', ...)` with the native manifest built
198
198
  from `directory` (runner.toml plus its main.py or main.sh entrypoint): the
199
199
  platform stores the bytes, derives the package and index SHA-256, creates the
200
200
  Runner asset on first use and registers the revision. `revision` is the full
@@ -219,7 +219,7 @@ class Runners:
219
219
  raise RemoteError('RUNNER_SOURCE_REF_INVALID')
220
220
  name, manifest, files, executables = runner_package(directory, name=name, executables=executables)
221
221
  ref = f'envloop://runners/{name}@{revision}'
222
- publication = Data(self._server).create(kind='runner', ref=ref, manifest=manifest, files=files,
222
+ publication = Data(self._server).create(type='runner', ref=ref, manifest=manifest, files=files,
223
223
  executables=executables, dry_run=dry_run)
224
224
  if dry_run:
225
225
  return publication