envloop-cli 2.1.0__tar.gz → 2.3.1__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.
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/PKG-INFO +23 -31
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/README.pypi.md +21 -29
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/cli_errors.py +1 -1
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/assets.py +4 -3
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/cli_output.py +2 -2
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/client.py +25 -21
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/execution_content.py +5 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/recipe_packages.py +2 -2
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/resource_cli.py +14 -19
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/runner_packages.py +27 -4
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/transfer.py +3 -1
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/cli.py +2 -2
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/client.py +3 -3
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/inference.py +2 -2
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_runner_cli.py +2 -2
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/pyproject.toml +4 -4
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/.gitignore +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/_optional.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/auth_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/auth_login.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/auth_workspace.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/cli_output.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/client.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/config.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/downloads.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/http.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/lifecycle_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/navigation_resources.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/profile_secrets.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/resource_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/resources.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/terminal.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/utils/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/envloop/utils/logging.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/checkpoint_download.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/checkpoint_upload.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/dataset_upload.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_artifact.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_checkpoint.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_publication.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_storage.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_worker_artifact.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/http.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/navigation_resources.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/profile_updates.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/publication_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/publications.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/r2_upload.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/recipes.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/tags.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/upload_strategy.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/chat/envloop_chat/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/chat/envloop_chat/cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/chat/envloop_chat/client.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/cli_output.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/decision.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/http.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/job_cost.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/job_logs.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/job_spec_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/named_profile.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/navigation_resources.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/resource_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/resources.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/runtime_params.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/sandbox.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_progress.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/rsi-loop/envloop_rsi_loop/__init__.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +0 -0
- {envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/rsi-loop/envloop_rsi_loop/loops.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: envloop-cli
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.3.1
|
|
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
|
|
@@ -10,7 +10,7 @@ Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
|
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Provides-Extra: asset
|
|
12
12
|
Requires-Dist: boto3==1.44.3; extra == 'asset'
|
|
13
|
-
Requires-Dist: envloop-envhub==
|
|
13
|
+
Requires-Dist: envloop-envhub==2.3.1; extra == 'asset'
|
|
14
14
|
Provides-Extra: chat
|
|
15
15
|
Requires-Dist: openai==3.55.1; extra == 'chat'
|
|
16
16
|
Provides-Extra: default
|
|
@@ -26,30 +26,16 @@ commands are equivalent. The Python import package is `envloop`.
|
|
|
26
26
|
|
|
27
27
|
## Release compatibility
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
release. Check your installed `el --version` and `el COMMAND --help` before
|
|
33
|
-
following an example; the source package version alone does not identify
|
|
34
|
-
unreleased features.
|
|
35
|
-
|
|
36
|
-
| Unreleased source enhancement | Published 1.33.0 |
|
|
37
|
-
| --- | --- |
|
|
38
|
-
| `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
|
|
39
|
-
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
40
|
-
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
41
|
-
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
42
|
-
|
|
43
|
-
Execution also requires a matching platform, project permissions and published
|
|
44
|
-
Runners; package installation alone does not establish those prerequisites. See the
|
|
29
|
+
Check your installed `el --version` and `el COMMAND --help` when following an
|
|
30
|
+
example. Upgrade an older installation with `uv tool upgrade envloop-cli`, or
|
|
31
|
+
`python -m pip install --upgrade envloop-cli` in your SDK environment. See the
|
|
45
32
|
[PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
available while waiting for a compatible platform release.
|
|
34
|
+
Job execution needs project permissions, readable published Runners and a
|
|
35
|
+
platform that supports the selected Profile and Runner formats. If the platform
|
|
36
|
+
rejects a format, ask your project administrator which published versions it
|
|
37
|
+
supports. Use `envloop-cli[chat]` for the Job chat examples below and
|
|
38
|
+
`envloop-cli[asset]` for ANS parsing and verified content transfers.
|
|
53
39
|
|
|
54
40
|
## Install
|
|
55
41
|
|
|
@@ -238,8 +224,8 @@ el job list --type sandbox
|
|
|
238
224
|
el job log JOB_ID --follow
|
|
239
225
|
```
|
|
240
226
|
|
|
241
|
-
The platform resolves `base` to the
|
|
242
|
-
freezes its immutable
|
|
227
|
+
The platform resolves `base` to the newest accessible successfully published `envloop/base` Revision and
|
|
228
|
+
freezes its immutable identity. The Sandbox image defaults to the registered Runner image;
|
|
243
229
|
`--image` accepts an image name, tag or digest. Bench and Sandbox submissions can request a
|
|
244
230
|
platform-enabled provider by name. In a request file, `provider` is a
|
|
245
231
|
top-level field alongside `spec` and optional `overrides` in an `envloop.job/v2`
|
|
@@ -250,7 +236,7 @@ Failures include a code, readable explanation, HTTP status when available, and
|
|
|
250
236
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
251
237
|
|
|
252
238
|
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
253
|
-
JobSpec (`spec.schema = "envloop.job/
|
|
239
|
+
JobSpec (`spec.schema = "envloop.job/v2"`) or a named `--profile`:
|
|
254
240
|
|
|
255
241
|
```bash
|
|
256
242
|
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
@@ -374,7 +360,9 @@ Availability requires matching platform support and approved content in your pro
|
|
|
374
360
|
|
|
375
361
|
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
376
362
|
and `set-visibility`. Every list row is an immutable version. A REF is an opaque resource ID,
|
|
377
|
-
a fixed ANS URI supported by that type, or `namespace/name@version
|
|
363
|
+
a fixed ANS URI supported by that type, or `namespace/name@version`. Recipe/Profile `get` also accepts
|
|
364
|
+
bare names or `@latest`, resolved by the platform to the newest accessible successful publication.
|
|
365
|
+
Dataset/Checkpoint names require explicit versions; mutation sources remain exact.
|
|
378
366
|
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
379
367
|
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
380
368
|
files, model identity and provenance stay in `asset.details`.
|
|
@@ -398,7 +386,10 @@ el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-
|
|
|
398
386
|
|
|
399
387
|
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
400
388
|
An update creates a new immutable version owned by the current Project and leaves Profile defaults
|
|
401
|
-
and submitted Job references unchanged. Profile default changes use `set-default REF --expected-version V
|
|
389
|
+
and submitted Job references unchanged. Profile default metadata changes use `set-default REF --expected-version V` and do not affect latest selection.
|
|
390
|
+
Runner/Recipe references in a Profile may omit the version or use `@latest`; Profile publication retains
|
|
391
|
+
those author references. Each new Job freezes the concrete URI, revision, hashes and owner; retries
|
|
392
|
+
with the same request ID retain the first choice.
|
|
402
393
|
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
403
394
|
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
404
395
|
an explicit `--expected-acl-revision`.
|
|
@@ -411,8 +402,9 @@ ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_
|
|
|
411
402
|
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
412
403
|
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
413
404
|
|
|
414
|
-
Dataset downloads require an explicit split and accept
|
|
415
|
-
digest selectors.
|
|
405
|
+
Dataset downloads require an explicit split and accept content digest and paired task ID/tree
|
|
406
|
+
digest selectors. Directory downloads with an explicit config selector are currently unsupported
|
|
407
|
+
by the pinned ANS dependency. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
416
408
|
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
417
409
|
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
418
410
|
|
|
@@ -6,30 +6,16 @@ commands are equivalent. The Python import package is `envloop`.
|
|
|
6
6
|
|
|
7
7
|
## Release compatibility
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
release. Check your installed `el --version` and `el COMMAND --help` before
|
|
13
|
-
following an example; the source package version alone does not identify
|
|
14
|
-
unreleased features.
|
|
15
|
-
|
|
16
|
-
| Unreleased source enhancement | Published 1.33.0 |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
|
|
19
|
-
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
20
|
-
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
21
|
-
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
22
|
-
|
|
23
|
-
Execution also requires a matching platform, project permissions and published
|
|
24
|
-
Runners; package installation alone does not establish those prerequisites. See the
|
|
9
|
+
Check your installed `el --version` and `el COMMAND --help` when following an
|
|
10
|
+
example. Upgrade an older installation with `uv tool upgrade envloop-cli`, or
|
|
11
|
+
`python -m pip install --upgrade envloop-cli` in your SDK environment. See the
|
|
25
12
|
[PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
|
|
26
13
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
available while waiting for a compatible platform release.
|
|
14
|
+
Job execution needs project permissions, readable published Runners and a
|
|
15
|
+
platform that supports the selected Profile and Runner formats. If the platform
|
|
16
|
+
rejects a format, ask your project administrator which published versions it
|
|
17
|
+
supports. Use `envloop-cli[chat]` for the Job chat examples below and
|
|
18
|
+
`envloop-cli[asset]` for ANS parsing and verified content transfers.
|
|
33
19
|
|
|
34
20
|
## Install
|
|
35
21
|
|
|
@@ -218,8 +204,8 @@ el job list --type sandbox
|
|
|
218
204
|
el job log JOB_ID --follow
|
|
219
205
|
```
|
|
220
206
|
|
|
221
|
-
The platform resolves `base` to the
|
|
222
|
-
freezes its immutable
|
|
207
|
+
The platform resolves `base` to the newest accessible successfully published `envloop/base` Revision and
|
|
208
|
+
freezes its immutable identity. The Sandbox image defaults to the registered Runner image;
|
|
223
209
|
`--image` accepts an image name, tag or digest. Bench and Sandbox submissions can request a
|
|
224
210
|
platform-enabled provider by name. In a request file, `provider` is a
|
|
225
211
|
top-level field alongside `spec` and optional `overrides` in an `envloop.job/v2`
|
|
@@ -230,7 +216,7 @@ Failures include a code, readable explanation, HTTP status when available, and
|
|
|
230
216
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
231
217
|
|
|
232
218
|
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
233
|
-
JobSpec (`spec.schema = "envloop.job/
|
|
219
|
+
JobSpec (`spec.schema = "envloop.job/v2"`) or a named `--profile`:
|
|
234
220
|
|
|
235
221
|
```bash
|
|
236
222
|
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
@@ -354,7 +340,9 @@ Availability requires matching platform support and approved content in your pro
|
|
|
354
340
|
|
|
355
341
|
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
356
342
|
and `set-visibility`. Every list row is an immutable version. A REF is an opaque resource ID,
|
|
357
|
-
a fixed ANS URI supported by that type, or `namespace/name@version
|
|
343
|
+
a fixed ANS URI supported by that type, or `namespace/name@version`. Recipe/Profile `get` also accepts
|
|
344
|
+
bare names or `@latest`, resolved by the platform to the newest accessible successful publication.
|
|
345
|
+
Dataset/Checkpoint names require explicit versions; mutation sources remain exact.
|
|
358
346
|
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
359
347
|
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
360
348
|
files, model identity and provenance stay in `asset.details`.
|
|
@@ -378,7 +366,10 @@ el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-
|
|
|
378
366
|
|
|
379
367
|
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
380
368
|
An update creates a new immutable version owned by the current Project and leaves Profile defaults
|
|
381
|
-
and submitted Job references unchanged. Profile default changes use `set-default REF --expected-version V
|
|
369
|
+
and submitted Job references unchanged. Profile default metadata changes use `set-default REF --expected-version V` and do not affect latest selection.
|
|
370
|
+
Runner/Recipe references in a Profile may omit the version or use `@latest`; Profile publication retains
|
|
371
|
+
those author references. Each new Job freezes the concrete URI, revision, hashes and owner; retries
|
|
372
|
+
with the same request ID retain the first choice.
|
|
382
373
|
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
383
374
|
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
384
375
|
an explicit `--expected-acl-revision`.
|
|
@@ -391,8 +382,9 @@ ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_
|
|
|
391
382
|
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
392
383
|
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
393
384
|
|
|
394
|
-
Dataset downloads require an explicit split and accept
|
|
395
|
-
digest selectors.
|
|
385
|
+
Dataset downloads require an explicit split and accept content digest and paired task ID/tree
|
|
386
|
+
digest selectors. Directory downloads with an explicit config selector are currently unsupported
|
|
387
|
+
by the pinned ANS dependency. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
396
388
|
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
397
389
|
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
398
390
|
|
|
@@ -56,7 +56,7 @@ _register("RUNNER_PACKAGE_INVALID", "The Runner package directory is invalid. It
|
|
|
56
56
|
_register("RUNNER_REVISION_INVALID", "Use the full lowercase 40- or 64-character source commit, or a local branch or tag name, as --revision and a NAMESPACE/NAME Runner name.")
|
|
57
57
|
_register("RUNNER_REVISION_UNRESOLVED", "--revision names no local branch or tag in the Git checkout that holds DIRECTORY, or Git is unavailable. Fetch or create the branch, or pass the full source commit.")
|
|
58
58
|
_register("RUNNER_PACKAGE_UNCOMMITTED", "DIRECTORY differs from the --revision commit: it has uncommitted changes, untracked files or ignored files, all of which would be published. Commit or remove them, or pass a full commit you vouch for.")
|
|
59
|
-
_register("
|
|
59
|
+
_register("RUNNER_COMMIT_METADATA_INVALID", "Git author and message must be single-line text of at most 256 and 4096 characters, respectively.")
|
|
60
60
|
_register("RUNNER_REVISION_CONFLICT", "The platform catalog holds different package or index hashes for this Runner revision. Publish a new revision instead of changing an existing one.")
|
|
61
61
|
_register("RECIPE_PACKAGE_INVALID RECIPE_DECLARATION_INVALID RECIPE_INVALID", "--directory must hold recipe.toml with schema_version = \"envloop.recipe/v3\" and the tables [recipe] name, types; [runner] name, abi; [source] paths, optional exclude and optional repository (a https://github.com/OWNER/REPO URL if given; omit it for a local-only repository); optional [inputs], [params], [outputs] and [dependencies]. No other top-level tables or keys are allowed.")
|
|
62
62
|
_register("RECIPE_PACKAGE_SCHEMA_RETIRED", "recipe.toml uses the retired envloop.recipe-publication/v3 format. Rewrite it as schema_version = \"envloop.recipe/v3\" with [recipe], [runner] and [source] tables and add entrypoint.sh next to it; published Recipes stay readable.")
|
|
@@ -9,9 +9,10 @@ from envloop.http import RemoteError, WaitTimeoutError
|
|
|
9
9
|
KINDS = ('dataset', 'checkpoint', 'recipe', 'profile')
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
def precise_ref(ref: str) -> str:
|
|
12
|
+
def precise_ref(ref: str, *, allow_name: bool = False) -> str:
|
|
13
13
|
if (not isinstance(ref, str) or not ref or len(ref) > 8192 or any(ord(c) < 32 for c in ref)
|
|
14
|
-
or '/' in ref and not ref.startswith('envloop://') and (
|
|
14
|
+
or '/' in ref and not ref.startswith('envloop://') and (
|
|
15
|
+
'@' not in ref and not allow_name or '@' in ref and not ref.rpartition('@')[2])):
|
|
15
16
|
raise ValueError('REF must be an opaque resource ID or a name with an explicit version (NAME@VERSION)')
|
|
16
17
|
return ref
|
|
17
18
|
|
|
@@ -89,7 +90,7 @@ class Assets:
|
|
|
89
90
|
def get(self, ref: str, *, type: str | None = None) -> dict[str, Any]:
|
|
90
91
|
if type not in (None, *KINDS):
|
|
91
92
|
raise ValueError('select a user asset type')
|
|
92
|
-
path = scope(self.transport) + '/assets/' + quote(precise_ref(ref), safe='')
|
|
93
|
+
path = scope(self.transport) + '/assets/' + quote(precise_ref(ref, allow_name=type in ('recipe', 'profile')), safe='')
|
|
93
94
|
value = envelope(self.transport.request('GET', path + ('?' + urlencode({'type': type}) if type else '')))
|
|
94
95
|
if value['asset'] is None or value['asset'].get('type') not in KINDS or type is not None and value['asset'].get('type') != type:
|
|
95
96
|
raise RemoteError('INVALID_RESPONSE')
|
|
@@ -46,8 +46,8 @@ def list_layout(items: list[dict[str, Any]], args: argparse.Namespace) -> tuple[
|
|
|
46
46
|
# Like el dataset list: STATUS / UNAVAILABLE REASON appear when the page reports them, so a
|
|
47
47
|
# Revision that differs between shared copies (RUNNER_REVISION_AMBIGUOUS) is visible in the table.
|
|
48
48
|
states = tuple(field for field in ('status', 'unavailable_reason') if any(field in item for item in items))
|
|
49
|
-
headers = ('NAME', 'REVISION', '
|
|
50
|
-
render = lambda item: (item.get('name'), item.get('revision'), item.get('
|
|
49
|
+
headers = ('NAME', 'REVISION', 'AUTHOR', 'MESSAGE', 'VISIBILITY', *(field.replace('_', ' ').upper() for field in states), *LIFECYCLE)
|
|
50
|
+
render = lambda item: (item.get('name'), item.get('revision'), item.get('author'), item.get('message'),
|
|
51
51
|
item.get('visibility'), *(item.get(field) for field in states), *lifecycle(item))
|
|
52
52
|
empty = 'No runners found.'
|
|
53
53
|
elif args.group == 'dataset' and args.action == 'list':
|
|
@@ -252,7 +252,7 @@ class Runners:
|
|
|
252
252
|
return self._server.list_runners(limit=limit, cursor=cursor)
|
|
253
253
|
|
|
254
254
|
def get(self, asset_id: str):
|
|
255
|
-
"""Read a Runner
|
|
255
|
+
"""Read a Runner by ID, fixed URI or registered NAME[@REVISION]; the API resolves latest."""
|
|
256
256
|
from envloop_asset.execution_content import ExecutionContent
|
|
257
257
|
resource = ExecutionContent(self._server, 'runner').get(asset_id)
|
|
258
258
|
if resource.get('type') != 'runner':
|
|
@@ -281,32 +281,29 @@ class Runners:
|
|
|
281
281
|
from .execution_content import ExecutionContent
|
|
282
282
|
return download_content(ExecutionContent(self._server,'runner'),ref,output,file_id=file_id,**selection)
|
|
283
283
|
|
|
284
|
-
def create(self, directory: str | Path, *, revision: str, name: str | None = None,
|
|
285
|
-
executables: Sequence[str] | None = None,
|
|
286
|
-
source_ref_kind: str = 'branch', dry_run: bool = False):
|
|
284
|
+
def create(self, directory: str | Path, *, revision: str = 'main', name: str | None = None,
|
|
285
|
+
executables: Sequence[str] | None = None, dry_run: bool = False):
|
|
287
286
|
"""Create an immutable Runner revision from a local package directory."""
|
|
288
287
|
return self._publish(directory, revision=revision, name=name, executables=executables,
|
|
289
|
-
|
|
288
|
+
dry_run=dry_run)
|
|
290
289
|
|
|
291
|
-
def update(self, asset_id: str, directory: str | Path, *, revision: str, name: str | None = None,
|
|
292
|
-
executables: Sequence[str] | None = None,
|
|
293
|
-
source_ref_kind: str = 'branch', dry_run: bool = False):
|
|
290
|
+
def update(self, asset_id: str, directory: str | Path, *, revision: str = 'main', name: str | None = None,
|
|
291
|
+
executables: Sequence[str] | None = None, dry_run: bool = False):
|
|
294
292
|
"""Publish a new immutable revision of the same Runner, preserving historical bytes."""
|
|
295
293
|
return self._publish(directory, revision=revision, name=name, executables=executables,
|
|
296
|
-
|
|
294
|
+
dry_run=dry_run, asset_id=asset_id)
|
|
297
295
|
|
|
298
296
|
def _publish(self, directory: str | Path, *, revision: str, name: str | None = None,
|
|
299
|
-
executables: Sequence[str] | None = None,
|
|
300
|
-
source_ref_kind: str = 'branch', dry_run: bool = False, asset_id: str | None = None):
|
|
297
|
+
executables: Sequence[str] | None = None, dry_run: bool = False, asset_id: str | None = None):
|
|
301
298
|
"""Publish a Runner package directory as the immutable revision NAME@REVISION.
|
|
302
299
|
|
|
303
300
|
This is the Runner domain publication API with the native manifest built
|
|
304
301
|
from `directory` (runner.toml plus its main.py or main.sh entrypoint): the
|
|
305
302
|
platform stores the bytes, derives the package and index SHA-256, creates the
|
|
306
303
|
Runner asset on first use and registers the revision. `revision` is the full
|
|
307
|
-
source commit
|
|
308
|
-
|
|
309
|
-
|
|
304
|
+
source commit or a local branch/tag, resolved once to its full commit. Branch
|
|
305
|
+
and tag names remain selectable after registration. Author and message
|
|
306
|
+
come from this commit; a detached package leaves unknown metadata empty. Returns `{'asset': publication, 'runner': catalog revision}`; a dry run
|
|
310
307
|
returns the server's validation result without publishing.
|
|
311
308
|
"""
|
|
312
309
|
from envloop.http import RemoteError
|
|
@@ -314,15 +311,22 @@ class Runners:
|
|
|
314
311
|
from envloop_asset.runner_packages import (
|
|
315
312
|
REFERENCE_KEYS,
|
|
316
313
|
REVISION,
|
|
317
|
-
|
|
314
|
+
commit_metadata,
|
|
315
|
+
resolve_source_revision,
|
|
318
316
|
runner_package,
|
|
319
|
-
source_ref_valid,
|
|
320
317
|
)
|
|
321
318
|
|
|
322
|
-
if not isinstance(revision, str) or
|
|
319
|
+
if not isinstance(revision, str) or name is not None and not isinstance(name, str):
|
|
323
320
|
raise RemoteError('RUNNER_REVISION_INVALID')
|
|
324
|
-
|
|
325
|
-
|
|
321
|
+
requested_revision = None
|
|
322
|
+
if not REVISION.fullmatch(revision):
|
|
323
|
+
if len(revision) >= 40 and all(character in '0123456789abcdefABCDEF' for character in revision):
|
|
324
|
+
raise RemoteError('RUNNER_REVISION_INVALID')
|
|
325
|
+
selected = revision
|
|
326
|
+
revision, kind = resolve_source_revision(directory, selected)
|
|
327
|
+
prefix = 'refs/heads/' if kind == 'branch' else 'refs/tags/'
|
|
328
|
+
requested_revision = selected if selected.startswith(prefix) else prefix + selected
|
|
329
|
+
metadata = commit_metadata(directory, revision)
|
|
326
330
|
name, manifest, files, executables = runner_package(directory, name=name, executables=executables)
|
|
327
331
|
ref = f'envloop://runners/{name}@{revision}'
|
|
328
332
|
data = ExecutionContent(self._server, 'runner')
|
|
@@ -339,11 +343,11 @@ class Runners:
|
|
|
339
343
|
or any(not isinstance(pinned.get(key), str) for key in REFERENCE_KEYS)):
|
|
340
344
|
raise RemoteError('INVALID_RESPONSE')
|
|
341
345
|
reference = {key: pinned[key] for key in REFERENCE_KEYS}
|
|
342
|
-
if
|
|
346
|
+
if requested_revision is None and not metadata:
|
|
343
347
|
runner = self._server.get_runner_revision(name, revision)
|
|
344
348
|
else:
|
|
345
349
|
runner = self._server.register_runner_revision(
|
|
346
|
-
name, {**reference,
|
|
350
|
+
name, {**reference, **metadata, **({'requested_revision': requested_revision} if requested_revision else {})})
|
|
347
351
|
# Both catalog views must name the same stored bytes.
|
|
348
352
|
if not isinstance(runner, dict) or any(runner.get(key) != value for key, value in reference.items()):
|
|
349
353
|
raise RemoteError('RUNNER_REVISION_CONFLICT')
|
|
@@ -16,6 +16,11 @@ class ExecutionContent(AssetTransfer):
|
|
|
16
16
|
path = scope(self.transport) + ('/runners' if self.kind == 'runner' else '/trials/artifacts')
|
|
17
17
|
return path if asset_id is None else path + '/' + quote(precise_ref(asset_id),safe='')
|
|
18
18
|
|
|
19
|
+
@override
|
|
20
|
+
def get(self, asset_id: str) -> dict[str, Any]:
|
|
21
|
+
ref = precise_ref(asset_id, allow_name=self.kind == 'runner')
|
|
22
|
+
return self.transport.request('GET', self._path() + '/' + quote(ref, safe=''))
|
|
23
|
+
|
|
19
24
|
@override
|
|
20
25
|
def list(self, *, type: Any = None, **filters: Any) -> dict[str, Any]:
|
|
21
26
|
if type not in (None,self.kind):
|
|
@@ -12,7 +12,7 @@ from pathlib import Path
|
|
|
12
12
|
from typing import Any
|
|
13
13
|
|
|
14
14
|
from envloop.http import RemoteError
|
|
15
|
-
from envloop_asset.runner_packages import REVISION,
|
|
15
|
+
from envloop_asset.runner_packages import REVISION, revision_valid
|
|
16
16
|
|
|
17
17
|
DECLARATION = 'recipe.toml'
|
|
18
18
|
GIT_TIMEOUT = 60
|
|
@@ -56,7 +56,7 @@ class _Repository:
|
|
|
56
56
|
if found.returncode == 0 and found.stdout.decode().strip() == ref:
|
|
57
57
|
return ref, 'commit'
|
|
58
58
|
raise RemoteError('RECIPE_REVISION_UNRESOLVED')
|
|
59
|
-
if not
|
|
59
|
+
if not revision_valid(ref):
|
|
60
60
|
raise RemoteError('RECIPE_REVISION_INVALID')
|
|
61
61
|
for kind, prefix in (('branch', 'refs/heads/'), ('tag', 'refs/tags/')):
|
|
62
62
|
found = self.git('rev-parse', '--verify', '--quiet', f'{prefix}{ref}^{{commit}}')
|
|
@@ -26,8 +26,11 @@ def add_resource_commands(groups: "argparse._SubParsersAction[argparse.ArgumentP
|
|
|
26
26
|
if kind == 'checkpoint':
|
|
27
27
|
command.add_argument('--job-id')
|
|
28
28
|
command.add_argument('--trial-id')
|
|
29
|
-
command = actions.add_parser('get', help='Read
|
|
30
|
-
command.add_argument('ref', metavar='REF', help=DATASET_REF_HELP if kind == 'dataset' else
|
|
29
|
+
command = actions.add_parser('get', help='Read a version without downloading files')
|
|
30
|
+
command.add_argument('ref', metavar='REF', help=(DATASET_REF_HELP if kind == 'dataset' else
|
|
31
|
+
'NAME, NAME@latest, NAME@VERSION, opaque asset ID or fixed ANS URI; '
|
|
32
|
+
'omitted version selects the newest accessible publication'
|
|
33
|
+
if kind in ('recipe', 'profile') else None))
|
|
31
34
|
command.add_argument('--json', action='store_true')
|
|
32
35
|
for action in ('create','update'):
|
|
33
36
|
command = actions.add_parser(action, help='Create an immutable version' if action == 'create' else 'Publish a new version from an owned exact source')
|
|
@@ -141,7 +144,9 @@ def add_runner_commands(groups: "argparse._SubParsersAction[argparse.ArgumentPar
|
|
|
141
144
|
command.add_argument('--ref')
|
|
142
145
|
for action in ('get','delete'):
|
|
143
146
|
command = actions.add_parser(action)
|
|
144
|
-
command.add_argument('asset_id', metavar='RUNNER_REF'
|
|
147
|
+
command.add_argument('asset_id', metavar='RUNNER_REF',
|
|
148
|
+
help=('Runner ID, fixed ANS URI or NAME[@REVISION]; omitted revision and @latest select the newest accessible publication'
|
|
149
|
+
if action == 'get' else 'Runner ID, fixed ANS URI or NAME@REVISION'))
|
|
145
150
|
if action == 'delete':
|
|
146
151
|
command.add_argument('--dry-run', action='store_true')
|
|
147
152
|
command.add_argument('--json', action='store_true')
|
|
@@ -300,10 +305,6 @@ def runner_package_arguments(command: argparse.ArgumentParser):
|
|
|
300
305
|
command.add_argument('--name', help='NAMESPACE/NAME; must equal [runner] name in runner.toml (default: that name)')
|
|
301
306
|
command.add_argument('--executable', action='append', dest='executables', metavar='PATH',
|
|
302
307
|
help='Declare an executable file; repeat for each. Default: files with an execute bit')
|
|
303
|
-
command.add_argument('--source-ref', metavar='REF', help='Also point this branch or tag name (for example main) at the revision, '
|
|
304
|
-
'so NAME@REF resolves to it (default: the branch or tag given as --revision)')
|
|
305
|
-
command.add_argument('--source-ref-kind', choices=['branch', 'tag', 'commit'],
|
|
306
|
-
help='Kind of --source-ref (default: branch, or the kind of the --revision branch or tag)')
|
|
307
308
|
command.add_argument('--dry-run', action='store_true', help='Validate the package and authorization without publishing')
|
|
308
309
|
|
|
309
310
|
|
|
@@ -323,26 +324,20 @@ def publish_runner(client: Any, args: argparse.Namespace):
|
|
|
323
324
|
import sys
|
|
324
325
|
|
|
325
326
|
from envloop.http import RemoteError
|
|
326
|
-
from envloop_asset.runner_packages import REVISION
|
|
327
|
+
from envloop_asset.runner_packages import REVISION
|
|
327
328
|
|
|
328
|
-
revision, source_ref, source_ref_kind = args.revision, args.source_ref, args.source_ref_kind
|
|
329
|
-
if not REVISION.fullmatch(revision):
|
|
330
|
-
revision, kind = resolve_source_revision(args.directory, args.revision)
|
|
331
|
-
if source_ref is None:
|
|
332
|
-
source_ref, source_ref_kind = args.revision, kind
|
|
333
|
-
print(f'resolved {kind} {args.revision} to {revision}', file=sys.stderr)
|
|
334
329
|
try:
|
|
335
330
|
operation = client.runners.create if args.action == 'create' else client.runners.update
|
|
336
331
|
positional = (args.directory,) if args.action == 'create' else (args.asset_id, args.directory)
|
|
337
|
-
result = operation(*positional, revision=revision, name=args.name,
|
|
338
|
-
executables=args.executables,
|
|
339
|
-
source_ref_kind=source_ref_kind or 'branch', dry_run=args.dry_run)
|
|
332
|
+
result = operation(*positional, revision=args.revision, name=args.name,
|
|
333
|
+
executables=args.executables, dry_run=args.dry_run)
|
|
340
334
|
except RemoteError as error:
|
|
341
335
|
if error.code in {'ACCESS_DENIED', 'ASSET_ACCESS_REQUIRED'} and not error.hint:
|
|
342
336
|
error.hint = RUNNER_WRITE_HINT
|
|
343
337
|
raise
|
|
344
338
|
if not args.dry_run:
|
|
345
339
|
runner = result['runner']
|
|
346
|
-
|
|
347
|
-
|
|
340
|
+
if not REVISION.fullmatch(args.revision):
|
|
341
|
+
print(f'resolved revision {args.revision} to {runner["revision"]}', file=sys.stderr)
|
|
342
|
+
print(f"{'created' if args.action == 'create' else 'updated'} {runner['uri']} (package sha256 {runner['sha256']})", file=sys.stderr)
|
|
348
343
|
return result
|
|
@@ -15,13 +15,12 @@ from envloop.http import RemoteError
|
|
|
15
15
|
NAME = re.compile(r'[a-zA-Z0-9][a-zA-Z0-9._-]*/[a-zA-Z0-9][a-zA-Z0-9._-]*')
|
|
16
16
|
REVISION = re.compile(r'[a-f0-9]{40}|[a-f0-9]{64}')
|
|
17
17
|
SEGMENT = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.-]*')
|
|
18
|
-
SOURCE_REF_KINDS = ('branch', 'tag', 'commit')
|
|
19
18
|
MAX_FILES = 100
|
|
20
19
|
MAX_BYTES = 8 * 1024 * 1024
|
|
21
20
|
REFERENCE_KEYS = ('uri', 'name', 'revision', 'sha256', 'index_sha256')
|
|
22
21
|
|
|
23
22
|
|
|
24
|
-
def
|
|
23
|
+
def revision_valid(value: Any) -> bool:
|
|
25
24
|
return (isinstance(value, str) and bool(value) and value not in ('HEAD', 'latest', 'default', 'release')
|
|
26
25
|
and not re.search(r'@\{|[~^:?*\[\\\s]', value) and '..' not in value and not value.startswith('-'))
|
|
27
26
|
|
|
@@ -88,7 +87,7 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
|
|
|
88
87
|
the bytes of that commit: tracked changes, untracked files and ignored files
|
|
89
88
|
are refused rather than published under the commit's name.
|
|
90
89
|
"""
|
|
91
|
-
if not
|
|
90
|
+
if not revision_valid(ref):
|
|
92
91
|
raise RemoteError('RUNNER_REVISION_INVALID')
|
|
93
92
|
root = Path(directory).absolute()
|
|
94
93
|
if root.is_symlink() or not root.is_dir():
|
|
@@ -101,7 +100,10 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
|
|
|
101
100
|
raise RemoteError('RUNNER_REVISION_UNRESOLVED') from None
|
|
102
101
|
|
|
103
102
|
for kind, prefix in (('branch', 'refs/heads/'), ('tag', 'refs/tags/')):
|
|
104
|
-
|
|
103
|
+
if ref.startswith(('refs/heads/', 'refs/tags/')) and not ref.startswith(prefix):
|
|
104
|
+
continue
|
|
105
|
+
selector = ref if ref.startswith(prefix) else prefix + ref
|
|
106
|
+
resolved = git('rev-parse', '--verify', '--quiet', f'{selector}^{{commit}}')
|
|
105
107
|
if resolved.returncode == 0 and REVISION.fullmatch(commit := resolved.stdout.strip()):
|
|
106
108
|
break
|
|
107
109
|
else:
|
|
@@ -111,3 +113,24 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
|
|
|
111
113
|
if changed.returncode != 0 or extra.returncode != 0 or extra.stdout.strip():
|
|
112
114
|
raise RemoteError('RUNNER_PACKAGE_UNCOMMITTED')
|
|
113
115
|
return commit, kind
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def commit_metadata(directory: str | Path, revision: str) -> dict[str, str]:
|
|
119
|
+
"""Read display metadata from the selected commit; a detached package has none."""
|
|
120
|
+
try:
|
|
121
|
+
result = subprocess.run(['git', '-C', str(Path(directory).absolute()), 'show', '--no-patch',
|
|
122
|
+
'--no-notes', '--format=%an%x00%s', revision, '--'],
|
|
123
|
+
capture_output=True, text=True, errors='replace', timeout=30)
|
|
124
|
+
except (OSError, subprocess.TimeoutExpired):
|
|
125
|
+
return {}
|
|
126
|
+
if result.returncode != 0:
|
|
127
|
+
return {}
|
|
128
|
+
values = result.stdout.rstrip('\n').split('\x00', 1)
|
|
129
|
+
if len(values) != 2:
|
|
130
|
+
return {}
|
|
131
|
+
metadata = dict(zip(('author', 'message'), values, strict=True))
|
|
132
|
+
for key, limit in (('author', 256), ('message', 4096)):
|
|
133
|
+
value = metadata[key]
|
|
134
|
+
if len(value) > limit or re.search(r'[\x00-\x1f\x7f]', value):
|
|
135
|
+
raise RemoteError('RUNNER_COMMIT_METADATA_INVALID')
|
|
136
|
+
return {key: value for key, value in metadata.items() if value.strip()}
|
|
@@ -353,13 +353,15 @@ class AssetTransfer:
|
|
|
353
353
|
# keep one materialization coordinator. Older Hub readers are serial.
|
|
354
354
|
materialization_options: dict[str, Any] = (
|
|
355
355
|
{'max_workers': 1} if 'max_workers' in inspect.signature(download_directory).parameters else {})
|
|
356
|
+
materialization_options.update({'config': config} if config is not None else {})
|
|
357
|
+
materialization_options.update(task_selection)
|
|
356
358
|
materialize_started = time.perf_counter()
|
|
357
359
|
materialize_cpu_started = time.thread_time()
|
|
358
360
|
query_count = len(timings['queries'])
|
|
359
361
|
validation_before_materialize = timings['plan_validation_seconds']
|
|
360
362
|
try:
|
|
361
363
|
target = download_directory(plan, Path(destination), uri=uri, split=split, content_digest=content_digest, read_url=read,
|
|
362
|
-
**materialization_options
|
|
364
|
+
**materialization_options)
|
|
363
365
|
except (ANSError, InvalidManifest, ValueError, TypeError, KeyError):
|
|
364
366
|
raise RemoteError('ASSET_INTEGRITY_FAILED', 409) from None
|
|
365
367
|
finally:
|
|
@@ -67,7 +67,7 @@ def log_page_size(value: str):
|
|
|
67
67
|
|
|
68
68
|
def runner_arguments(submit: argparse.ArgumentParser):
|
|
69
69
|
submit.add_argument("--runner", metavar="NAME[@REVISION]",
|
|
70
|
-
help="
|
|
70
|
+
help="Registered Runner NAME or NAME@REVISION; omitted revision and @latest select the newest accessible publication")
|
|
71
71
|
submit.add_argument("--job-id", help="Bench/Sandbox: caller-selected Job ID")
|
|
72
72
|
submit.add_argument("--tag", help="Bench/Sandbox: run label")
|
|
73
73
|
submit.add_argument("--priority", type=int, help="Bench/Sandbox/Train recipe: waiting priority; explicit value overrides spec (server default: 0)")
|
|
@@ -148,7 +148,7 @@ def add_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParser]"):
|
|
|
148
148
|
job_submit.add_argument("--attempts", type=int)
|
|
149
149
|
job_submit.add_argument("--request-id", help="idempotency key; overrides request_id in --spec")
|
|
150
150
|
job_submit.add_argument("--profile", type=profile_reference, metavar="NAME[@VERSION]",
|
|
151
|
-
help="named runtime Profile; omitted version
|
|
151
|
+
help="named runtime Profile; omitted version and @latest select the newest accessible unarchived publication")
|
|
152
152
|
job_submit.add_argument('--input', action='append', default=[], metavar='NAME=URI|NAME=ASSET_ID',
|
|
153
153
|
help='Bind an ANS input slot of a named Train/Bench/Sandbox Profile; repeatable. '
|
|
154
154
|
'A Dataset URI alone uses the default config and the train split; a Asset ID (data_…) '
|
|
@@ -388,16 +388,16 @@ class Trials:
|
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
def runner_selector(value: str):
|
|
391
|
-
"""
|
|
391
|
+
"""Pass a registered name or portable revision; latest resolution belongs to the API."""
|
|
392
392
|
if not isinstance(value, str):
|
|
393
393
|
raise ValueError("runner requires name@revision")
|
|
394
394
|
name, separator, revision = value.partition("@")
|
|
395
|
-
if (not
|
|
395
|
+
if (not name or "/" not in name or separator and not revision
|
|
396
396
|
or value != value.strip() or any(char.isspace() for char in value)
|
|
397
397
|
or revision in {"HEAD", "FETCH_HEAD", "ORIG_HEAD", "MERGE_HEAD", "CHERRY_PICK_HEAD", "REVERT_HEAD"}
|
|
398
398
|
or revision.startswith("-") or ".." in revision or revision == "@" or "@{" in revision
|
|
399
399
|
or any(char in revision for char in "~^:{}?*[\\")):
|
|
400
|
-
raise ValueError("runner requires name
|
|
400
|
+
raise ValueError("runner requires namespace/name with optional latest, commit, tag or branch")
|
|
401
401
|
return value
|
|
402
402
|
|
|
403
403
|
|
|
@@ -26,8 +26,8 @@ def validate_submission(body: Any):
|
|
|
26
26
|
raise ValueError('fixed-input inference cannot mix legacy or runtime fields')
|
|
27
27
|
runner = spec['runner']
|
|
28
28
|
if (not isinstance(runner, str)
|
|
29
|
-
or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]
|
|
30
|
-
raise ValueError('runner requires namespace/name
|
|
29
|
+
or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*(?:@[^\s@]+)?', runner)):
|
|
30
|
+
raise ValueError('runner requires namespace/name with an optional revision')
|
|
31
31
|
if not isinstance(spec.get('name'), str) or not spec['name'].strip():
|
|
32
32
|
raise ValueError('fixed-input inference requires name')
|
|
33
33
|
profile = spec.get('profile')
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_runner_cli.py
RENAMED
|
@@ -44,8 +44,8 @@ def runner_request(args: argparse.Namespace):
|
|
|
44
44
|
from envloop_experiment.client import runner_selector
|
|
45
45
|
from envloop_experiment.sandbox import validate_image
|
|
46
46
|
|
|
47
|
-
if not args.runner or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]
|
|
48
|
-
raise ValueError('Train Runner requires --runner namespace/name@REVISION')
|
|
47
|
+
if not args.runner or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*(?:@[^\s@]+)?', args.runner):
|
|
48
|
+
raise ValueError('Train Runner requires --runner namespace/name[@REVISION]')
|
|
49
49
|
runner = runner_selector(args.runner)
|
|
50
50
|
if args.docker is not None and args.image is not None:
|
|
51
51
|
raise ValueError('--docker and --image cannot be combined')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "envloop-cli"
|
|
3
|
-
version = "2.1
|
|
3
|
+
version = "2.3.1"
|
|
4
4
|
description = "EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference"
|
|
5
5
|
requires-python = ">=3.12"
|
|
6
6
|
readme = "README.pypi.md"
|
|
@@ -8,7 +8,7 @@ dependencies = []
|
|
|
8
8
|
|
|
9
9
|
[project.optional-dependencies]
|
|
10
10
|
default = []
|
|
11
|
-
asset = ["envloop-envhub==
|
|
11
|
+
asset = ["envloop-envhub==2.3.1", "boto3==1.44.3"]
|
|
12
12
|
experiment = []
|
|
13
13
|
rsi-loop = []
|
|
14
14
|
chat = ["openai==3.55.1"]
|
|
@@ -25,7 +25,7 @@ Issues = "https://github.com/EnvLoop/envloop-cli/issues"
|
|
|
25
25
|
"Agent instructions" = "https://docs.envloop.ai/skill.md"
|
|
26
26
|
|
|
27
27
|
[dependency-groups]
|
|
28
|
-
dev = ["ruff==0.17.3", "pre-commit>=4.6,<5", "pytest>=8", "envloop-envhub==
|
|
28
|
+
dev = ["ruff==0.17.3", "pre-commit>=4.6,<5", "pytest>=8", "envloop-envhub==2.3.1", "pyrefly==1.4.0", "openai==3.55.1"]
|
|
29
29
|
|
|
30
30
|
[build-system]
|
|
31
31
|
requires = ["hatchling"]
|
|
@@ -66,7 +66,7 @@ combine-as-imports = true
|
|
|
66
66
|
known-first-party = ["envloop", "envloop_asset", "envloop_experiment", "envloop_rsi_loop", "envloop_chat"]
|
|
67
67
|
|
|
68
68
|
[tool.uv.sources]
|
|
69
|
-
envloop-envhub = { git = "ssh://git@github.com/EnvLoop/EnvHub.git", rev = "
|
|
69
|
+
envloop-envhub = { git = "ssh://git@github.com/EnvLoop/EnvHub.git", rev = "6ee0011a5e833edef3bbc6c472760368a0fc1a33" }
|
|
70
70
|
|
|
71
71
|
[tool.pyrefly]
|
|
72
72
|
preset = "strict"
|
|
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
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/direct_worker_artifact.py
RENAMED
|
File without changes
|
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/asset/envloop_asset/navigation_resources.py
RENAMED
|
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
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/cli_output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/job_spec_cli.py
RENAMED
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/named_profile.py
RENAMED
|
File without changes
|
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/resource_cli.py
RENAMED
|
File without changes
|
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/runtime_params.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_log_cli.py
RENAMED
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_metrics_cli.py
RENAMED
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/train_progress.py
RENAMED
|
File without changes
|
{envloop_cli-2.1.0 → envloop_cli-2.3.1}/packages/experiment/envloop_experiment/training/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|