envloop-cli 1.33.0__tar.gz → 2.0.0__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-1.33.0 → envloop_cli-2.0.0}/PKG-INFO +118 -33
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/README.pypi.md +116 -32
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/__init__.py +4 -1
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/_optional.py +33 -20
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/cli.py +33 -8
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/cli_errors.py +50 -37
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/cli_output.py +8 -6
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/client.py +1 -1
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/downloads.py +5 -3
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/http.py +28 -9
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/lifecycle_cli.py +6 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/profile_secrets.py +9 -5
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/resource_cli.py +1 -6
- envloop_cli-2.0.0/packages/asset/envloop_asset/assets.py +537 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/checkpoint_download.py +82 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/checkpoint_upload.py +6 -6
- envloop_cli-2.0.0/packages/asset/envloop_asset/cli.py +88 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/cli_output.py +18 -65
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/client.py +58 -33
- envloop_cli-1.33.0/packages/data/envloop_data/data_upload.py → envloop_cli-2.0.0/packages/asset/envloop_asset/dataset_upload.py +108 -23
- envloop_cli-2.0.0/packages/asset/envloop_asset/direct_artifact.py +212 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/direct_checkpoint.py +132 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/direct_publication.py +46 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/direct_storage.py +242 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/direct_worker_artifact.py +86 -0
- envloop_cli-2.0.0/packages/asset/envloop_asset/execution_content.py +23 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/http.py +3 -3
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/navigation_resources.py +5 -5
- envloop_cli-2.0.0/packages/asset/envloop_asset/publication_cli.py +83 -0
- envloop_cli-1.33.0/packages/data/envloop_data/data_publications.py → envloop_cli-2.0.0/packages/asset/envloop_asset/publications.py +7 -6
- envloop_cli-2.0.0/packages/asset/envloop_asset/r2_upload.py +27 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/recipe_packages.py +5 -5
- envloop_cli-2.0.0/packages/asset/envloop_asset/resource_cli.py +348 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/runner_packages.py +6 -4
- envloop_cli-2.0.0/packages/asset/envloop_asset/tags.py +27 -0
- envloop_cli-1.33.0/packages/data/envloop_data/data.py → envloop_cli-2.0.0/packages/asset/envloop_asset/transfer.py +211 -105
- envloop_cli-2.0.0/packages/asset/envloop_asset/upload_strategy.py +18 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/cli.py +160 -55
- envloop_cli-2.0.0/packages/experiment/envloop_experiment/cli_output.py +91 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/client.py +222 -32
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/http.py +23 -1
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/job_spec_cli.py +23 -15
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/named_profile.py +57 -18
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/navigation_resources.py +1 -2
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/resource_cli.py +1 -3
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/resources.py +0 -3
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/pyproject.toml +7 -7
- envloop_cli-1.33.0/packages/data/envloop_data/cli.py +0 -191
- envloop_cli-1.33.0/packages/data/envloop_data/data_cli.py +0 -442
- envloop_cli-1.33.0/packages/data/envloop_data/resource_cli.py +0 -175
- envloop_cli-1.33.0/packages/experiment/envloop_experiment/cli_output.py +0 -50
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/.gitignore +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/auth_cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/auth_login.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/auth_workspace.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/config.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/navigation_resources.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/resources.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/terminal.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/utils/__init__.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/envloop/utils/logging.py +0 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/__init__.py +0 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/profile_updates.py +0 -0
- {envloop_cli-1.33.0/packages/data/envloop_data → envloop_cli-2.0.0/packages/asset/envloop_asset}/recipes.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/__init__.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/decision.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/inference.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/job_cost.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/job_logs.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/runtime_params.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/sandbox.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/train.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/train_progress.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/train_runner_cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/rsi-loop/envloop_rsi_loop/__init__.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +0 -0
- {envloop_cli-1.33.0 → envloop_cli-2.0.0}/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:
|
|
3
|
+
Version: 2.0.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
|
|
@@ -8,8 +8,9 @@ Project-URL: Repository, https://github.com/EnvLoop/envloop-cli
|
|
|
8
8
|
Project-URL: Issues, https://github.com/EnvLoop/envloop-cli/issues
|
|
9
9
|
Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
|
-
Provides-Extra:
|
|
12
|
-
Requires-Dist:
|
|
11
|
+
Provides-Extra: asset
|
|
12
|
+
Requires-Dist: boto3==1.44.3; extra == 'asset'
|
|
13
|
+
Requires-Dist: envloop-envhub==1.23.0; extra == 'asset'
|
|
13
14
|
Provides-Extra: default
|
|
14
15
|
Provides-Extra: experiment
|
|
15
16
|
Provides-Extra: rsi-loop
|
|
@@ -21,17 +22,32 @@ Install the public client to run agent Jobs, inspect Trials, manage training and
|
|
|
21
22
|
checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
|
|
22
23
|
commands are equivalent. The Python import package is `envloop`.
|
|
23
24
|
|
|
24
|
-
##
|
|
25
|
+
## Release compatibility
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
This page describes the current client source. Published 1.33.0 includes
|
|
28
|
+
`runner list|get|create|update|delete`, replacing the `list|register` commands in
|
|
29
|
+
1.32.0. The enhancements below are not in published 1.33.0 and await a new
|
|
30
|
+
release. Check your installed `el --version` and `el COMMAND --help` before
|
|
31
|
+
following an example; the source package version alone does not identify
|
|
32
|
+
unreleased features.
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
| Unreleased source enhancement | Published 1.33.0 |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
37
|
+
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
38
|
+
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
39
|
+
|
|
40
|
+
Execution also requires a matching platform, project permissions and published
|
|
41
|
+
Runners; package installation alone does not establish those prerequisites. See the
|
|
33
42
|
[PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
|
|
34
43
|
|
|
44
|
+
Profile v4 requires platform support from [EnvPlatform #1489](https://github.com/EnvLoop/EnvPlatform/pull/1489).
|
|
45
|
+
Running a v6 Runner in a Sandbox also requires the bootstrap fix in
|
|
46
|
+
[EnvPlatform #1490](https://github.com/EnvLoop/EnvPlatform/pull/1490).
|
|
47
|
+
Platform 1.71.0 contains neither change: upgrading the CLI alone does not enable
|
|
48
|
+
these features on that server version. Existing historical Profile formats remain
|
|
49
|
+
available while waiting for a compatible platform release.
|
|
50
|
+
|
|
35
51
|
## Install
|
|
36
52
|
|
|
37
53
|
envloop-cli requires Python 3.12 or later; an existing compatible interpreter can
|
|
@@ -52,7 +68,7 @@ uv pip install --upgrade envloop-cli
|
|
|
52
68
|
python3.12 -m pip install --upgrade envloop-cli
|
|
53
69
|
```
|
|
54
70
|
|
|
55
|
-
Every installation includes Jobs, Trials, training, logs, inference calls,
|
|
71
|
+
Every installation includes Jobs, Trials, training, logs, inference calls, Assets, checkpoints and RSI Loop controls.
|
|
56
72
|
Check that the SDK can be imported:
|
|
57
73
|
|
|
58
74
|
```bash
|
|
@@ -71,19 +87,19 @@ One `envloop-cli` wheel and source archive contain all feature code. Extras add
|
|
|
71
87
|
|
|
72
88
|
```bash
|
|
73
89
|
python -m pip install envloop-cli
|
|
74
|
-
python -m pip install "envloop-cli[
|
|
75
|
-
python -m pip install "envloop-cli[
|
|
90
|
+
python -m pip install "envloop-cli[asset]"
|
|
91
|
+
python -m pip install "envloop-cli[asset,experiment,rsi-loop]"
|
|
76
92
|
```
|
|
77
93
|
|
|
78
|
-
Every installation includes the existing Job, Trial,
|
|
94
|
+
Every installation includes the existing Job, Trial, Assets and RSI Loop commands, and every `--help` works without extras. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `asset` adds `envloop-envhub==1.23.0` for ANS parsing and verified content, and `boto3==1.44.3` for direct object storage transfers. Other Assets API operations use the bundled client implementation. A command that needs the missing ANS dependency stops with `FEATURE_NOT_INSTALLED` and the `envloop-cli[asset]` installation instruction.
|
|
79
95
|
|
|
80
96
|
Feature modules load lazily. Default imports, help and experiment operations do not require EnvHub or certifi. Only the single `envloop-cli` distribution owns the `el` / `envloop` scripts. The examples below require an authorized matching platform; installation does not grant permissions.
|
|
81
97
|
|
|
82
|
-
Versions 1.23.0 and 1.24.0 on PyPI depend on feature packages that were never published: their `data` extra cannot be installed and
|
|
98
|
+
Versions 1.23.0 and 1.24.0 on PyPI depend on feature packages that were never published: their historical `data` extra cannot be installed and their DATA command group is empty. They also install a separate `envloop-cli-experiment` package that shares files with this release. Remove both before installing; uninstalling `envloop-cli-experiment` after an upgrade deletes files the client needs and leads to `FEATURE_NOT_INSTALLED`, which the same commands repair:
|
|
83
99
|
|
|
84
100
|
```bash
|
|
85
101
|
python -m pip uninstall -y envloop-cli envloop-cli-experiment
|
|
86
|
-
python -m pip install "envloop-cli[
|
|
102
|
+
python -m pip install "envloop-cli[asset]"
|
|
87
103
|
```
|
|
88
104
|
|
|
89
105
|
## Connect
|
|
@@ -189,7 +205,9 @@ el job submit --type train --profile team/sft@3 \
|
|
|
189
205
|
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
190
206
|
```
|
|
191
207
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
192
|
-
retain their case and duplicates are rejected.
|
|
208
|
+
retain their case and duplicates are rejected. Without input overrides, v4/v5
|
|
209
|
+
Profiles use a canonical JobSpec after one public schema lookup; explicit values
|
|
210
|
+
go in `overrides`, while the platform freezes Profile defaults and inputs.
|
|
193
211
|
|
|
194
212
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
195
213
|
Sandbox Job without a Dataset:
|
|
@@ -208,6 +226,18 @@ by the server. Job logs retain the actual captured output and collection metadat
|
|
|
208
226
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
209
227
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
210
228
|
|
|
229
|
+
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
230
|
+
JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Omitting the option preserves spec/Profile parameters and the Runner default
|
|
237
|
+
(`docker`). An explicit option overrides the file's `harbor_env` parameter;
|
|
238
|
+
setting the same key with `--params` is rejected. The option selects Harbor's
|
|
239
|
+
task environment; platform execution placement remains server configured.
|
|
240
|
+
|
|
211
241
|
## Existing installations
|
|
212
242
|
|
|
213
243
|
This distribution provides both the CLI and the `envloop` import package. Use a
|
|
@@ -232,6 +262,7 @@ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://doc
|
|
|
232
262
|
Training uses billable resources. Check your project permissions, balance and data format, then submit once:
|
|
233
263
|
|
|
234
264
|
```bash
|
|
265
|
+
el job resolve --spec REQUEST.json --json
|
|
235
266
|
el job submit --type train --spec REQUEST.json
|
|
236
267
|
el job get JOB_ID
|
|
237
268
|
el job log JOB_ID --follow
|
|
@@ -241,9 +272,19 @@ el checkpoint list --job-id JOB_ID
|
|
|
241
272
|
|
|
242
273
|
`job submit --spec` reads the complete Job specification JSON file for Train or Inference.
|
|
243
274
|
The former `job submit --file` option is removed; the JSON payload is unchanged.
|
|
275
|
+
`job resolve --spec FILE --json` previews the resolved specification without creating a Job.
|
|
276
|
+
Artifact downloads transfer directly from object storage and require `envloop-cli[asset]`; without it they stop with `FEATURE_NOT_INSTALLED` and the install command.
|
|
244
277
|
|
|
245
278
|
Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
|
|
246
279
|
Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
|
|
280
|
+
A platform-authorized Train worker publishes its saved checkpoints directly to object storage:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
el checkpoint create --result /output/train-result.json --directory /output --json
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Install `envloop-cli[asset]` for this operation. The saved `envloop.train-result/v1` descriptors locate the checkpoint directories. The platform supplies producer identity from its worker credential; ordinary project keys cannot claim a Job or Trial. Success returns `durable: true`, `upload_actor: "worker"`, and committed checkpoint receipts with real ANS URIs and manifest SHA-256 values. Local save names and directories are preserved; the published save name is `checkpoint-N` for step N.
|
|
287
|
+
|
|
247
288
|
See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
|
|
248
289
|
|
|
249
290
|
The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
|
|
@@ -306,26 +347,70 @@ Use the exact model returned by the Job. The SDK forwards the payload to the
|
|
|
306
347
|
Job's `/inference/decision` API; the approved plugin validates its business fields.
|
|
307
348
|
Availability requires matching platform support and approved content in your project.
|
|
308
349
|
|
|
309
|
-
##
|
|
350
|
+
## User Assets and verified downloads
|
|
310
351
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
A compatible server is required. Data uses the permission of the resource it touches: read (for example `datasets.read`) to query and download, write to publish and upload, delete to retire; a key from `el auth login` follows your project role. The current login selects the base URL, workspace and project; there is no `--env` flag. After configuring the Key using `el auth config`:
|
|
352
|
+
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
353
|
+
and `set-visibility`. Every list row is an immutable version. A REF is an opaque resource ID,
|
|
354
|
+
a fixed ANS URI supported by that type, or `namespace/name@version`; a bare name is rejected.
|
|
355
|
+
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
356
|
+
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
357
|
+
files, model identity and provenance stay in `asset.details`.
|
|
318
358
|
|
|
319
359
|
```bash
|
|
320
|
-
el
|
|
321
|
-
el
|
|
322
|
-
el
|
|
360
|
+
el dataset list --name example/eval --json
|
|
361
|
+
el dataset create --file dataset.json --directory ./files --tags 'topic:finance' --wait
|
|
362
|
+
el dataset get example/eval@1.0 --json
|
|
363
|
+
el dataset file list example/eval@1.0
|
|
364
|
+
el dataset download example/eval@1.0 --split test --output ./content
|
|
365
|
+
el dataset create --format harbor --directory ./tasks --name example/eval --version 1.0
|
|
366
|
+
el dataset registration create example/eval@1.0 --runner envloop/harbor@FULL_COMMIT --wait
|
|
367
|
+
el recipe create --directory ./recipe --revision FULL_COMMIT --wait
|
|
368
|
+
el checkpoint create --model example/model --revision FULL_MODEL_COMMIT
|
|
369
|
+
el checkpoint create --result train-result.json --checkpoint-name checkpoint-100 --directory ./outputs
|
|
370
|
+
el profile create --name example/train --version 1.0 --file profile.toml --secret HF_TOKEN=env:HF_TOKEN
|
|
371
|
+
el profile update example/train@1.0 --version 2.0 --patch changes.toml
|
|
372
|
+
el profile export example/train@2.0 --output ./profile.toml
|
|
373
|
+
el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-revision 3
|
|
323
374
|
```
|
|
324
375
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
376
|
+
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
377
|
+
An update creates a new immutable version owned by the current Project and leaves Profile defaults
|
|
378
|
+
and submitted Job references unchanged. Profile default changes use `set-default REF --expected-version V`.
|
|
379
|
+
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
380
|
+
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
381
|
+
an explicit `--expected-acl-revision`.
|
|
382
|
+
|
|
383
|
+
A create/update establishes a unique publication operation and transfers verified bytes. Without
|
|
384
|
+
`--wait`, pending results preserve the operation ID and may have `asset: null`; an upload or staging
|
|
385
|
+
ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_ID`,
|
|
386
|
+
`upload part UPLOAD_ID --number N --file PART`, `upload complete OPERATION_ID` or
|
|
387
|
+
`upload abort OPERATION_ID` to inspect/resume that operation. Complete is idempotent and is the
|
|
388
|
+
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
389
|
+
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
390
|
+
|
|
391
|
+
Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
|
|
392
|
+
digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
393
|
+
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
394
|
+
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
395
|
+
|
|
396
|
+
Worker checkpoint publication selects exactly one saved descriptor. Multi-save result files require
|
|
397
|
+
`--checkpoint-name`. Producer identity comes only from the platform-issued worker credential;
|
|
398
|
+
ordinary project keys cannot invent Job/Trial provenance. External HF metadata registration does
|
|
399
|
+
not download weights or establish training provenance.
|
|
400
|
+
|
|
401
|
+
The SDK uses `client.datasets/checkpoints/recipes/profiles` for typed operations and
|
|
402
|
+
`client.assets.list/get` for read-only aggregation. Examples:
|
|
328
403
|
|
|
329
|
-
|
|
404
|
+
```python
|
|
405
|
+
client.datasets.create(manifest=manifest, files=files, wait=True, tags={"topic": "finance"})
|
|
406
|
+
client.datasets.download("example/eval@1.0", "./content", split="test")
|
|
407
|
+
client.profiles.update("example/train@1.0", version="2.0", patch={"params": {"seed": 2}})
|
|
408
|
+
```
|
|
330
409
|
|
|
331
|
-
|
|
410
|
+
Runner is a platform execution capability under Experiment. Its existing package command remains
|
|
411
|
+
`el runner create DIRECTORY --revision FULL_COMMIT`; `runner list --ref REF` and
|
|
412
|
+
`runner download REF --output DIR --content-digest SHA256` use the execution domain.
|
|
413
|
+
Trial Artifact publication is `el trial artifact create --file manifest.json --directory ./outputs`.
|
|
414
|
+
`trial artifact download --ref URI --output DIR --content-digest SHA256` downloads one fixed
|
|
415
|
+
ANS directory; `trial artifact download TRIAL_ID --output DIR` downloads all uploaded Trial files.
|
|
416
|
+
These execution-owned records are excluded from Assets.
|
|
@@ -4,17 +4,32 @@ Install the public client to run agent Jobs, inspect Trials, manage training and
|
|
|
4
4
|
checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
|
|
5
5
|
commands are equivalent. The Python import package is `envloop`.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
## Release compatibility
|
|
8
|
+
|
|
9
|
+
This page describes the current client source. Published 1.33.0 includes
|
|
10
|
+
`runner list|get|create|update|delete`, replacing the `list|register` commands in
|
|
11
|
+
1.32.0. The enhancements below are not in published 1.33.0 and await a new
|
|
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
|
+
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
19
|
+
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
20
|
+
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
21
|
+
|
|
22
|
+
Execution also requires a matching platform, project permissions and published
|
|
23
|
+
Runners; package installation alone does not establish those prerequisites. See the
|
|
16
24
|
[PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
|
|
17
25
|
|
|
26
|
+
Profile v4 requires platform support from [EnvPlatform #1489](https://github.com/EnvLoop/EnvPlatform/pull/1489).
|
|
27
|
+
Running a v6 Runner in a Sandbox also requires the bootstrap fix in
|
|
28
|
+
[EnvPlatform #1490](https://github.com/EnvLoop/EnvPlatform/pull/1490).
|
|
29
|
+
Platform 1.71.0 contains neither change: upgrading the CLI alone does not enable
|
|
30
|
+
these features on that server version. Existing historical Profile formats remain
|
|
31
|
+
available while waiting for a compatible platform release.
|
|
32
|
+
|
|
18
33
|
## Install
|
|
19
34
|
|
|
20
35
|
envloop-cli requires Python 3.12 or later; an existing compatible interpreter can
|
|
@@ -35,7 +50,7 @@ uv pip install --upgrade envloop-cli
|
|
|
35
50
|
python3.12 -m pip install --upgrade envloop-cli
|
|
36
51
|
```
|
|
37
52
|
|
|
38
|
-
Every installation includes Jobs, Trials, training, logs, inference calls,
|
|
53
|
+
Every installation includes Jobs, Trials, training, logs, inference calls, Assets, checkpoints and RSI Loop controls.
|
|
39
54
|
Check that the SDK can be imported:
|
|
40
55
|
|
|
41
56
|
```bash
|
|
@@ -54,19 +69,19 @@ One `envloop-cli` wheel and source archive contain all feature code. Extras add
|
|
|
54
69
|
|
|
55
70
|
```bash
|
|
56
71
|
python -m pip install envloop-cli
|
|
57
|
-
python -m pip install "envloop-cli[
|
|
58
|
-
python -m pip install "envloop-cli[
|
|
72
|
+
python -m pip install "envloop-cli[asset]"
|
|
73
|
+
python -m pip install "envloop-cli[asset,experiment,rsi-loop]"
|
|
59
74
|
```
|
|
60
75
|
|
|
61
|
-
Every installation includes the existing Job, Trial,
|
|
76
|
+
Every installation includes the existing Job, Trial, Assets and RSI Loop commands, and every `--help` works without extras. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `asset` adds `envloop-envhub==1.23.0` for ANS parsing and verified content, and `boto3==1.44.3` for direct object storage transfers. Other Assets API operations use the bundled client implementation. A command that needs the missing ANS dependency stops with `FEATURE_NOT_INSTALLED` and the `envloop-cli[asset]` installation instruction.
|
|
62
77
|
|
|
63
78
|
Feature modules load lazily. Default imports, help and experiment operations do not require EnvHub or certifi. Only the single `envloop-cli` distribution owns the `el` / `envloop` scripts. The examples below require an authorized matching platform; installation does not grant permissions.
|
|
64
79
|
|
|
65
|
-
Versions 1.23.0 and 1.24.0 on PyPI depend on feature packages that were never published: their `data` extra cannot be installed and
|
|
80
|
+
Versions 1.23.0 and 1.24.0 on PyPI depend on feature packages that were never published: their historical `data` extra cannot be installed and their DATA command group is empty. They also install a separate `envloop-cli-experiment` package that shares files with this release. Remove both before installing; uninstalling `envloop-cli-experiment` after an upgrade deletes files the client needs and leads to `FEATURE_NOT_INSTALLED`, which the same commands repair:
|
|
66
81
|
|
|
67
82
|
```bash
|
|
68
83
|
python -m pip uninstall -y envloop-cli envloop-cli-experiment
|
|
69
|
-
python -m pip install "envloop-cli[
|
|
84
|
+
python -m pip install "envloop-cli[asset]"
|
|
70
85
|
```
|
|
71
86
|
|
|
72
87
|
## Connect
|
|
@@ -172,7 +187,9 @@ el job submit --type train --profile team/sft@3 \
|
|
|
172
187
|
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
173
188
|
```
|
|
174
189
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
175
|
-
retain their case and duplicates are rejected.
|
|
190
|
+
retain their case and duplicates are rejected. Without input overrides, v4/v5
|
|
191
|
+
Profiles use a canonical JobSpec after one public schema lookup; explicit values
|
|
192
|
+
go in `overrides`, while the platform freezes Profile defaults and inputs.
|
|
176
193
|
|
|
177
194
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
178
195
|
Sandbox Job without a Dataset:
|
|
@@ -191,6 +208,18 @@ by the server. Job logs retain the actual captured output and collection metadat
|
|
|
191
208
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
192
209
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
193
210
|
|
|
211
|
+
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
212
|
+
JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Omitting the option preserves spec/Profile parameters and the Runner default
|
|
219
|
+
(`docker`). An explicit option overrides the file's `harbor_env` parameter;
|
|
220
|
+
setting the same key with `--params` is rejected. The option selects Harbor's
|
|
221
|
+
task environment; platform execution placement remains server configured.
|
|
222
|
+
|
|
194
223
|
## Existing installations
|
|
195
224
|
|
|
196
225
|
This distribution provides both the CLI and the `envloop` import package. Use a
|
|
@@ -215,6 +244,7 @@ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://doc
|
|
|
215
244
|
Training uses billable resources. Check your project permissions, balance and data format, then submit once:
|
|
216
245
|
|
|
217
246
|
```bash
|
|
247
|
+
el job resolve --spec REQUEST.json --json
|
|
218
248
|
el job submit --type train --spec REQUEST.json
|
|
219
249
|
el job get JOB_ID
|
|
220
250
|
el job log JOB_ID --follow
|
|
@@ -224,9 +254,19 @@ el checkpoint list --job-id JOB_ID
|
|
|
224
254
|
|
|
225
255
|
`job submit --spec` reads the complete Job specification JSON file for Train or Inference.
|
|
226
256
|
The former `job submit --file` option is removed; the JSON payload is unchanged.
|
|
257
|
+
`job resolve --spec FILE --json` previews the resolved specification without creating a Job.
|
|
258
|
+
Artifact downloads transfer directly from object storage and require `envloop-cli[asset]`; without it they stop with `FEATURE_NOT_INSTALLED` and the install command.
|
|
227
259
|
|
|
228
260
|
Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
|
|
229
261
|
Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
|
|
262
|
+
A platform-authorized Train worker publishes its saved checkpoints directly to object storage:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
el checkpoint create --result /output/train-result.json --directory /output --json
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Install `envloop-cli[asset]` for this operation. The saved `envloop.train-result/v1` descriptors locate the checkpoint directories. The platform supplies producer identity from its worker credential; ordinary project keys cannot claim a Job or Trial. Success returns `durable: true`, `upload_actor: "worker"`, and committed checkpoint receipts with real ANS URIs and manifest SHA-256 values. Local save names and directories are preserved; the published save name is `checkpoint-N` for step N.
|
|
269
|
+
|
|
230
270
|
See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
|
|
231
271
|
|
|
232
272
|
The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
|
|
@@ -289,26 +329,70 @@ Use the exact model returned by the Job. The SDK forwards the payload to the
|
|
|
289
329
|
Job's `/inference/decision` API; the approved plugin validates its business fields.
|
|
290
330
|
Availability requires matching platform support and approved content in your project.
|
|
291
331
|
|
|
292
|
-
##
|
|
332
|
+
## User Assets and verified downloads
|
|
293
333
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
A compatible server is required. Data uses the permission of the resource it touches: read (for example `datasets.read`) to query and download, write to publish and upload, delete to retire; a key from `el auth login` follows your project role. The current login selects the base URL, workspace and project; there is no `--env` flag. After configuring the Key using `el auth config`:
|
|
334
|
+
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
335
|
+
and `set-visibility`. Every list row is an immutable version. A REF is an opaque resource ID,
|
|
336
|
+
a fixed ANS URI supported by that type, or `namespace/name@version`; a bare name is rejected.
|
|
337
|
+
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
338
|
+
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
339
|
+
files, model identity and provenance stay in `asset.details`.
|
|
301
340
|
|
|
302
341
|
```bash
|
|
303
|
-
el
|
|
304
|
-
el
|
|
305
|
-
el
|
|
342
|
+
el dataset list --name example/eval --json
|
|
343
|
+
el dataset create --file dataset.json --directory ./files --tags 'topic:finance' --wait
|
|
344
|
+
el dataset get example/eval@1.0 --json
|
|
345
|
+
el dataset file list example/eval@1.0
|
|
346
|
+
el dataset download example/eval@1.0 --split test --output ./content
|
|
347
|
+
el dataset create --format harbor --directory ./tasks --name example/eval --version 1.0
|
|
348
|
+
el dataset registration create example/eval@1.0 --runner envloop/harbor@FULL_COMMIT --wait
|
|
349
|
+
el recipe create --directory ./recipe --revision FULL_COMMIT --wait
|
|
350
|
+
el checkpoint create --model example/model --revision FULL_MODEL_COMMIT
|
|
351
|
+
el checkpoint create --result train-result.json --checkpoint-name checkpoint-100 --directory ./outputs
|
|
352
|
+
el profile create --name example/train --version 1.0 --file profile.toml --secret HF_TOKEN=env:HF_TOKEN
|
|
353
|
+
el profile update example/train@1.0 --version 2.0 --patch changes.toml
|
|
354
|
+
el profile export example/train@2.0 --output ./profile.toml
|
|
355
|
+
el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-revision 3
|
|
306
356
|
```
|
|
307
357
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
358
|
+
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
359
|
+
An update creates a new immutable version owned by the current Project and leaves Profile defaults
|
|
360
|
+
and submitted Job references unchanged. Profile default changes use `set-default REF --expected-version V`.
|
|
361
|
+
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
362
|
+
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
363
|
+
an explicit `--expected-acl-revision`.
|
|
364
|
+
|
|
365
|
+
A create/update establishes a unique publication operation and transfers verified bytes. Without
|
|
366
|
+
`--wait`, pending results preserve the operation ID and may have `asset: null`; an upload or staging
|
|
367
|
+
ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_ID`,
|
|
368
|
+
`upload part UPLOAD_ID --number N --file PART`, `upload complete OPERATION_ID` or
|
|
369
|
+
`upload abort OPERATION_ID` to inspect/resume that operation. Complete is idempotent and is the
|
|
370
|
+
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
371
|
+
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
372
|
+
|
|
373
|
+
Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
|
|
374
|
+
digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
375
|
+
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
376
|
+
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
377
|
+
|
|
378
|
+
Worker checkpoint publication selects exactly one saved descriptor. Multi-save result files require
|
|
379
|
+
`--checkpoint-name`. Producer identity comes only from the platform-issued worker credential;
|
|
380
|
+
ordinary project keys cannot invent Job/Trial provenance. External HF metadata registration does
|
|
381
|
+
not download weights or establish training provenance.
|
|
382
|
+
|
|
383
|
+
The SDK uses `client.datasets/checkpoints/recipes/profiles` for typed operations and
|
|
384
|
+
`client.assets.list/get` for read-only aggregation. Examples:
|
|
311
385
|
|
|
312
|
-
|
|
386
|
+
```python
|
|
387
|
+
client.datasets.create(manifest=manifest, files=files, wait=True, tags={"topic": "finance"})
|
|
388
|
+
client.datasets.download("example/eval@1.0", "./content", split="test")
|
|
389
|
+
client.profiles.update("example/train@1.0", version="2.0", patch={"params": {"seed": 2}})
|
|
390
|
+
```
|
|
313
391
|
|
|
314
|
-
|
|
392
|
+
Runner is a platform execution capability under Experiment. Its existing package command remains
|
|
393
|
+
`el runner create DIRECTORY --revision FULL_COMMIT`; `runner list --ref REF` and
|
|
394
|
+
`runner download REF --output DIR --content-digest SHA256` use the execution domain.
|
|
395
|
+
Trial Artifact publication is `el trial artifact create --file manifest.json --directory ./outputs`.
|
|
396
|
+
`trial artifact download --ref URI --output DIR --content-digest SHA256` downloads one fixed
|
|
397
|
+
ANS directory; `trial artifact download TRIAL_ID --output DIR` downloads all uploaded Trial files.
|
|
398
|
+
These execution-owned records are excluded from Assets.
|
|
@@ -3,10 +3,13 @@ from ._optional import install_legacy_imports
|
|
|
3
3
|
from .client import Client
|
|
4
4
|
|
|
5
5
|
install_legacy_imports()
|
|
6
|
-
__all__ = ['Client', 'DecisionClient']
|
|
6
|
+
__all__ = ['Client', 'DecisionClient', 'ByteRange']
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def __getattr__(name: str):
|
|
10
|
+
if name == 'ByteRange':
|
|
11
|
+
from ._optional import feature_attribute
|
|
12
|
+
return feature_attribute('asset','transfer','ByteRange')
|
|
10
13
|
if name == 'DecisionClient':
|
|
11
14
|
from ._optional import feature_attribute
|
|
12
15
|
return feature_attribute('experiment', 'decision', name)
|
|
@@ -13,11 +13,11 @@ from importlib.machinery import ModuleSpec
|
|
|
13
13
|
from types import ModuleType
|
|
14
14
|
from typing import Any, override
|
|
15
15
|
|
|
16
|
-
FEATURES = {'
|
|
16
|
+
FEATURES = {'asset': 'envloop_asset', 'experiment': 'envloop_experiment', 'rsi-loop': 'envloop_rsi_loop'}
|
|
17
17
|
FEATURE_COMMANDS = {
|
|
18
|
-
'
|
|
18
|
+
'asset': {
|
|
19
19
|
'dataset': 'Discover Datasets, revisions and tasks',
|
|
20
|
-
'
|
|
20
|
+
'recipe': 'Publish and manage immutable Recipes',
|
|
21
21
|
'runner': 'Discover available Runner revisions',
|
|
22
22
|
'checkpoint': 'List, share and download saved training Checkpoints',
|
|
23
23
|
'profile': 'Manage platform runtime Profiles',
|
|
@@ -32,16 +32,16 @@ FEATURE_COMMANDS = {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
MODULES: dict[str, str] = {
|
|
35
|
-
**dict.fromkeys('
|
|
35
|
+
**dict.fromkeys('profile_updates recipes'.split(), 'asset'),
|
|
36
36
|
**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'),
|
|
37
37
|
**dict.fromkeys('loops'.split(), 'rsi-loop'),
|
|
38
38
|
}
|
|
39
39
|
CLIENTS = {
|
|
40
|
-
**{name: ('
|
|
40
|
+
**{name: ('asset', 'client') for name in ('ProfileService', 'RunnerService', 'Profiles', 'Runners')},
|
|
41
41
|
**{name: ('experiment', 'client') for name in ('TrialService', 'RpcService', 'load_task', 'validate_command', 'dataset_selector', 'Trials', 'runner_selector', 'job_budget', 'Jobs')},
|
|
42
42
|
**{name: ('base', 'downloads') for name in ('ArtifactError', 'artifact_path')},
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
ASSET_ENDPOINTS = set('open_download resolve_dataset list_runners get_runner_revision register_runner_revision runner_path profile_path put_profile list_profiles get_profile resolve_profile set_default_profile archive_profile set_profile_visibility fork_profile revoke_profile_secret export_profile import_profile open_checkpoint_archive'.split())
|
|
45
45
|
EXPERIMENT_ENDPOINTS = set('submit_job get_job get_job_result get_job_logs list_jobs job_action job_events stop_job list_trials get_task_run get_trial_detail get_trial_training list_trial_metrics list_trial_checkpoints get_task_result get_task_snapshot stop_task list_trial_artifacts open_trial_artifact'.split())
|
|
46
46
|
|
|
47
47
|
|
|
@@ -79,10 +79,19 @@ def available(feature: str):
|
|
|
79
79
|
return importlib.util.find_spec(FEATURES[feature]) is not None
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
def
|
|
82
|
+
def require_asset_dependencies():
|
|
83
83
|
"""Only ANS operations need the public protocol/download dependency."""
|
|
84
84
|
if importlib.util.find_spec('envhub') is None:
|
|
85
|
-
raise MissingFeatureError('
|
|
85
|
+
raise MissingFeatureError('asset')
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def missing_feature(error: BaseException) -> MissingFeatureError | None:
|
|
89
|
+
"""Treat a deferred import of the public ANS dependency as the missing [asset] extra."""
|
|
90
|
+
if isinstance(error, MissingFeatureError):
|
|
91
|
+
return error
|
|
92
|
+
if isinstance(error, ModuleNotFoundError) and isinstance(error.name, str) and error.name.partition('.')[0] == 'envhub':
|
|
93
|
+
return MissingFeatureError('asset')
|
|
94
|
+
return None
|
|
86
95
|
|
|
87
96
|
|
|
88
97
|
def feature_module(feature: str, module: str):
|
|
@@ -107,8 +116,8 @@ def client_attribute(name: str):
|
|
|
107
116
|
|
|
108
117
|
|
|
109
118
|
def endpoint(name: str):
|
|
110
|
-
if name in
|
|
111
|
-
feature = '
|
|
119
|
+
if name in ASSET_ENDPOINTS:
|
|
120
|
+
feature = 'asset'
|
|
112
121
|
elif name in EXPERIMENT_ENDPOINTS:
|
|
113
122
|
feature = 'experiment'
|
|
114
123
|
else:
|
|
@@ -119,7 +128,7 @@ def endpoint(name: str):
|
|
|
119
128
|
|
|
120
129
|
def navigation(name: str):
|
|
121
130
|
if name in {'Datasets', 'Checkpoints', '_checkpoint_matches', '_checkpoint_target', '_verified_checkpoint_file'}:
|
|
122
|
-
return feature_attribute('
|
|
131
|
+
return feature_attribute('asset', 'navigation_resources', name)
|
|
123
132
|
if name in {'Inference', 'InferenceResource'}:
|
|
124
133
|
return feature_attribute('experiment', 'navigation_resources', name)
|
|
125
134
|
raise AttributeError(name)
|
|
@@ -135,14 +144,18 @@ def client_resource(client: Any, name: str):
|
|
|
135
144
|
return feature_attribute('experiment', 'navigation_resources', 'Dashboard')(client.project, client.jobs, client.training_jobs)
|
|
136
145
|
from .navigation_resources import Dashboard
|
|
137
146
|
return Dashboard(client.project)
|
|
138
|
-
if name
|
|
139
|
-
return feature_attribute('
|
|
140
|
-
if name
|
|
141
|
-
return feature_attribute('
|
|
147
|
+
if name == 'profiles':
|
|
148
|
+
return feature_attribute('asset', 'assets', 'ProfileAssets')(server)
|
|
149
|
+
if name == 'runners':
|
|
150
|
+
return feature_attribute('asset', 'client', name.capitalize())(server)
|
|
151
|
+
if name == 'assets':
|
|
152
|
+
return feature_attribute('asset', 'assets', 'Assets')(server)
|
|
153
|
+
if name == 'recipes':
|
|
154
|
+
return feature_attribute('asset', 'assets', 'ContentResource')(server, 'recipe')
|
|
142
155
|
if name == 'datasets':
|
|
143
|
-
return
|
|
156
|
+
return feature_attribute('asset', 'assets', 'DatasetAssets')(server)
|
|
144
157
|
if name == 'checkpoints':
|
|
145
|
-
return feature_attribute('
|
|
158
|
+
return feature_attribute('asset', 'assets', 'ContentResource')(server, 'checkpoint')
|
|
146
159
|
if name == 'jobs':
|
|
147
160
|
return feature_attribute('experiment', 'client', 'Jobs')(server)
|
|
148
161
|
if name == 'trials':
|
|
@@ -166,9 +179,9 @@ def execute_command(args: argparse.Namespace, client: Any, cli: Any):
|
|
|
166
179
|
if args.group == 'loop':
|
|
167
180
|
return feature_module('rsi-loop', 'loop_cli').execute(args, client)
|
|
168
181
|
if args.group == 'profile':
|
|
169
|
-
return feature_module('
|
|
170
|
-
if args.group in {'
|
|
171
|
-
return feature_module('
|
|
182
|
+
return feature_module('asset', 'cli').execute_profile(args, client, cli)
|
|
183
|
+
if args.group in {'recipe', 'dataset', 'runner', 'checkpoint'}:
|
|
184
|
+
return feature_module('asset', 'resource_cli').execute(args, client)
|
|
172
185
|
from .resource_cli import execute
|
|
173
186
|
return execute(args, client)
|
|
174
187
|
|