envloop-cli 1.34.0__tar.gz → 2.1.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.34.0 → envloop_cli-2.1.0}/PKG-INFO +122 -31
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/README.pypi.md +116 -28
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/__init__.py +4 -1
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/_optional.py +26 -22
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/cli.py +36 -8
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/cli_errors.py +46 -31
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/cli_output.py +8 -6
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/client.py +1 -1
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/downloads.py +5 -3
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/http.py +38 -17
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/lifecycle_cli.py +6 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/profile_secrets.py +9 -5
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/resource_cli.py +1 -6
- envloop_cli-2.1.0/packages/asset/envloop_asset/assets.py +546 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/checkpoint_download.py +82 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/checkpoint_upload.py +6 -6
- envloop_cli-2.1.0/packages/asset/envloop_asset/cli.py +88 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/cli_output.py +18 -65
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/client.py +58 -33
- envloop_cli-1.34.0/packages/data/envloop_data/data_upload.py → envloop_cli-2.1.0/packages/asset/envloop_asset/dataset_upload.py +15 -15
- envloop_cli-2.1.0/packages/asset/envloop_asset/direct_artifact.py +212 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/direct_checkpoint.py +170 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/direct_publication.py +84 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/direct_storage.py +246 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/direct_worker_artifact.py +86 -0
- envloop_cli-2.1.0/packages/asset/envloop_asset/execution_content.py +23 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/http.py +3 -3
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/navigation_resources.py +5 -5
- envloop_cli-2.1.0/packages/asset/envloop_asset/publication_cli.py +83 -0
- envloop_cli-1.34.0/packages/data/envloop_data/data_publications.py → envloop_cli-2.1.0/packages/asset/envloop_asset/publications.py +6 -6
- envloop_cli-2.1.0/packages/asset/envloop_asset/r2_upload.py +27 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/recipe_packages.py +5 -5
- envloop_cli-2.1.0/packages/asset/envloop_asset/resource_cli.py +348 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/runner_packages.py +6 -4
- envloop_cli-2.1.0/packages/asset/envloop_asset/tags.py +47 -0
- envloop_cli-1.34.0/packages/data/envloop_data/data.py → envloop_cli-2.1.0/packages/asset/envloop_asset/transfer.py +325 -107
- envloop_cli-2.1.0/packages/asset/envloop_asset/upload_strategy.py +18 -0
- envloop_cli-2.1.0/packages/chat/envloop_chat/__init__.py +1 -0
- envloop_cli-2.1.0/packages/chat/envloop_chat/cli.py +116 -0
- envloop_cli-2.1.0/packages/chat/envloop_chat/client.py +146 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/cli.py +174 -67
- envloop_cli-2.1.0/packages/experiment/envloop_experiment/cli_output.py +91 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/client.py +241 -38
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/http.py +8 -1
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/job_spec_cli.py +29 -18
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/named_profile.py +62 -19
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/navigation_resources.py +1 -2
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/resource_cli.py +1 -3
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/resources.py +0 -3
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/pyproject.toml +9 -8
- envloop_cli-1.34.0/packages/data/envloop_data/cli.py +0 -191
- envloop_cli-1.34.0/packages/data/envloop_data/data_cli.py +0 -458
- envloop_cli-1.34.0/packages/data/envloop_data/resource_cli.py +0 -179
- envloop_cli-1.34.0/packages/experiment/envloop_experiment/cli_output.py +0 -50
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/.gitignore +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/auth_cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/auth_login.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/auth_workspace.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/config.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/navigation_resources.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/resources.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/terminal.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/utils/__init__.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/envloop/utils/logging.py +0 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/__init__.py +0 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/profile_updates.py +0 -0
- {envloop_cli-1.34.0/packages/data/envloop_data → envloop_cli-2.1.0/packages/asset/envloop_asset}/recipes.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/__init__.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/decision.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/inference.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/job_cost.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/job_logs.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/runtime_params.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/sandbox.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/train.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/train_progress.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/train_runner_cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/rsi-loop/envloop_rsi_loop/__init__.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.0}/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +0 -0
- {envloop_cli-1.34.0 → envloop_cli-2.1.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: 1.
|
|
3
|
+
Version: 2.1.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,11 @@ 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'
|
|
14
|
+
Provides-Extra: chat
|
|
15
|
+
Requires-Dist: openai==3.55.1; extra == 'chat'
|
|
13
16
|
Provides-Extra: default
|
|
14
17
|
Provides-Extra: experiment
|
|
15
18
|
Provides-Extra: rsi-loop
|
|
@@ -32,8 +35,9 @@ unreleased features.
|
|
|
32
35
|
|
|
33
36
|
| Unreleased source enhancement | Published 1.33.0 |
|
|
34
37
|
| --- | --- |
|
|
38
|
+
| `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
|
|
35
39
|
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
36
|
-
| `el
|
|
40
|
+
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
37
41
|
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
38
42
|
|
|
39
43
|
Execution also requires a matching platform, project permissions and published
|
|
@@ -67,7 +71,7 @@ uv pip install --upgrade envloop-cli
|
|
|
67
71
|
python3.12 -m pip install --upgrade envloop-cli
|
|
68
72
|
```
|
|
69
73
|
|
|
70
|
-
Every installation includes Jobs, Trials, training, logs, inference calls,
|
|
74
|
+
Every installation includes Jobs, Trials, training, logs, inference calls, Assets, checkpoints and RSI Loop controls.
|
|
71
75
|
Check that the SDK can be imported:
|
|
72
76
|
|
|
73
77
|
```bash
|
|
@@ -86,23 +90,38 @@ One `envloop-cli` wheel and source archive contain all feature code. Extras add
|
|
|
86
90
|
|
|
87
91
|
```bash
|
|
88
92
|
python -m pip install envloop-cli
|
|
89
|
-
python -m pip install "envloop-cli[
|
|
90
|
-
python -m pip install "envloop-cli[
|
|
93
|
+
python -m pip install "envloop-cli[asset]"
|
|
94
|
+
python -m pip install "envloop-cli[asset,experiment,rsi-loop]"
|
|
91
95
|
```
|
|
92
96
|
|
|
93
|
-
Every installation includes the existing Job, Trial,
|
|
97
|
+
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.
|
|
94
98
|
|
|
95
99
|
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.
|
|
96
100
|
|
|
97
|
-
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
|
|
101
|
+
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:
|
|
98
102
|
|
|
99
103
|
```bash
|
|
100
104
|
python -m pip uninstall -y envloop-cli envloop-cli-experiment
|
|
101
|
-
python -m pip install "envloop-cli[
|
|
105
|
+
python -m pip install "envloop-cli[asset]"
|
|
102
106
|
```
|
|
103
107
|
|
|
104
108
|
## Connect
|
|
105
109
|
|
|
110
|
+
For Job-bound chat, install the optional dependency in the same environment:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
python -m pip install "envloop-cli[chat]"
|
|
114
|
+
el job chat JOB_ID "Introduce yourself."
|
|
115
|
+
el job chat JOB_ID
|
|
116
|
+
el job chat JOB_ID "Hello" --json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Text answers stream by default. `--json` returns one complete response.
|
|
120
|
+
The command uses the configured EnvLoop connection and automatically reads the
|
|
121
|
+
Job's model. The `chat` extra uses the official OpenAI Python SDK against EnvLoop;
|
|
122
|
+
it does not use an OpenAI account. `/clear` resets terminal history, `/exit` leaves,
|
|
123
|
+
and Ctrl+C exits without stopping the Job.
|
|
124
|
+
|
|
106
125
|
Use an authorized EnvLoop account and project. Browser authorization:
|
|
107
126
|
|
|
108
127
|
```bash
|
|
@@ -204,7 +223,9 @@ el job submit --type train --profile team/sft@3 \
|
|
|
204
223
|
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
205
224
|
```
|
|
206
225
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
207
|
-
retain their case and duplicates are rejected.
|
|
226
|
+
retain their case and duplicates are rejected. Without input overrides, v4/v5
|
|
227
|
+
Profiles use a canonical JobSpec after one public schema lookup; explicit values
|
|
228
|
+
go in `overrides`, while the platform freezes Profile defaults and inputs.
|
|
208
229
|
|
|
209
230
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
210
231
|
Sandbox Job without a Dataset:
|
|
@@ -212,17 +233,34 @@ Sandbox Job without a Dataset:
|
|
|
212
233
|
```bash
|
|
213
234
|
el job submit --type sandbox --runner base --command 'python --version'
|
|
214
235
|
el job submit --type sandbox --runner base --image python:3.11 --wait
|
|
236
|
+
el job submit --type sandbox --provider e2b --spec REQUEST.json
|
|
215
237
|
el job list --type sandbox
|
|
216
238
|
el job log JOB_ID --follow
|
|
217
239
|
```
|
|
218
240
|
|
|
219
241
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
220
242
|
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
221
|
-
`--image` accepts an image name, tag or digest.
|
|
222
|
-
by
|
|
243
|
+
`--image` accepts an image name, tag or digest. Bench and Sandbox submissions can request a
|
|
244
|
+
platform-enabled provider by name. In a request file, `provider` is a
|
|
245
|
+
top-level field alongside `spec` and optional `overrides` in an `envloop.job/v2`
|
|
246
|
+
envelope. The `--provider` flag overrides that field and also works with the
|
|
247
|
+
named `--profile` shortcut. Omit the selection to use the platform default.
|
|
248
|
+
Job logs retain the actual captured output and collection metadata.
|
|
223
249
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
224
250
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
225
251
|
|
|
252
|
+
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
253
|
+
JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Omitting the option preserves spec/Profile parameters and the Runner default
|
|
260
|
+
(`docker`). An explicit option overrides the file's `harbor_env` parameter;
|
|
261
|
+
setting the same key with `--params` is rejected. The option selects Harbor's
|
|
262
|
+
task environment; platform execution placement remains server configured.
|
|
263
|
+
|
|
226
264
|
## Existing installations
|
|
227
265
|
|
|
228
266
|
This distribution provides both the CLI and the `envloop` import package. Use a
|
|
@@ -247,6 +285,7 @@ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://doc
|
|
|
247
285
|
Training uses billable resources. Check your project permissions, balance and data format, then submit once:
|
|
248
286
|
|
|
249
287
|
```bash
|
|
288
|
+
el job resolve --spec REQUEST.json --json
|
|
250
289
|
el job submit --type train --spec REQUEST.json
|
|
251
290
|
el job get JOB_ID
|
|
252
291
|
el job log JOB_ID --follow
|
|
@@ -256,9 +295,19 @@ el checkpoint list --job-id JOB_ID
|
|
|
256
295
|
|
|
257
296
|
`job submit --spec` reads the complete Job specification JSON file for Train or Inference.
|
|
258
297
|
The former `job submit --file` option is removed; the JSON payload is unchanged.
|
|
298
|
+
`job resolve --spec FILE --json` previews the resolved specification without creating a Job.
|
|
299
|
+
Artifact downloads transfer directly from object storage and require `envloop-cli[asset]`; without it they stop with `FEATURE_NOT_INSTALLED` and the install command.
|
|
259
300
|
|
|
260
301
|
Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
|
|
261
302
|
Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
|
|
303
|
+
A platform-authorized Train worker publishes its saved checkpoints directly to object storage:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
el checkpoint create --result /output/train-result.json --directory /output --json
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
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.
|
|
310
|
+
|
|
262
311
|
See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
|
|
263
312
|
|
|
264
313
|
The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
|
|
@@ -321,28 +370,70 @@ Use the exact model returned by the Job. The SDK forwards the payload to the
|
|
|
321
370
|
Job's `/inference/decision` API; the approved plugin validates its business fields.
|
|
322
371
|
Availability requires matching platform support and approved content in your project.
|
|
323
372
|
|
|
324
|
-
##
|
|
373
|
+
## User Assets and verified downloads
|
|
325
374
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
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`:
|
|
375
|
+
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
376
|
+
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`; a bare name is rejected.
|
|
378
|
+
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
379
|
+
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
380
|
+
files, model identity and provenance stay in `asset.details`.
|
|
333
381
|
|
|
334
382
|
```bash
|
|
335
|
-
el
|
|
336
|
-
el
|
|
337
|
-
el
|
|
383
|
+
el dataset list --name example/eval --json
|
|
384
|
+
el dataset create --file dataset.json --directory ./files --tags 'topic:finance' --wait
|
|
385
|
+
el dataset get example/eval@1.0 --json
|
|
386
|
+
el dataset file list example/eval@1.0
|
|
387
|
+
el dataset download example/eval@1.0 --split test --output ./content
|
|
388
|
+
el dataset create --format harbor --directory ./tasks --name example/eval --version 1.0
|
|
389
|
+
el dataset registration create example/eval@1.0 --runner envloop/harbor@FULL_COMMIT --wait
|
|
390
|
+
el recipe create --directory ./recipe --revision FULL_COMMIT --wait
|
|
391
|
+
el checkpoint create --model example/model --revision FULL_MODEL_COMMIT
|
|
392
|
+
el checkpoint create --result train-result.json --checkpoint-name checkpoint-100 --directory ./outputs
|
|
393
|
+
el profile create --name example/train --version 1.0 --file profile.toml --secret HF_TOKEN=env:HF_TOKEN
|
|
394
|
+
el profile update example/train@1.0 --version 2.0 --patch changes.toml
|
|
395
|
+
el profile export example/train@2.0 --output ./profile.toml
|
|
396
|
+
el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-revision 3
|
|
338
397
|
```
|
|
339
398
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
399
|
+
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
400
|
+
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`.
|
|
402
|
+
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
403
|
+
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
404
|
+
an explicit `--expected-acl-revision`.
|
|
405
|
+
|
|
406
|
+
A create/update establishes a unique publication operation and transfers verified bytes. Without
|
|
407
|
+
`--wait`, pending results preserve the operation ID and may have `asset: null`; an upload or staging
|
|
408
|
+
ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_ID`,
|
|
409
|
+
`upload part UPLOAD_ID --number N --file PART`, `upload complete OPERATION_ID` or
|
|
410
|
+
`upload abort OPERATION_ID` to inspect/resume that operation. Complete is idempotent and is the
|
|
411
|
+
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
412
|
+
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
413
|
+
|
|
414
|
+
Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
|
|
415
|
+
digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
416
|
+
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
417
|
+
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
418
|
+
|
|
419
|
+
Worker checkpoint publication selects exactly one saved descriptor. Multi-save result files require
|
|
420
|
+
`--checkpoint-name`. Producer identity comes only from the platform-issued worker credential;
|
|
421
|
+
ordinary project keys cannot invent Job/Trial provenance. External HF metadata registration does
|
|
422
|
+
not download weights or establish training provenance.
|
|
423
|
+
|
|
424
|
+
The SDK uses `client.datasets/checkpoints/recipes/profiles` for typed operations and
|
|
425
|
+
`client.assets.list/get` for read-only aggregation. Examples:
|
|
345
426
|
|
|
346
|
-
|
|
427
|
+
```python
|
|
428
|
+
client.datasets.create(manifest=manifest, files=files, wait=True, tags={"topic": "finance"})
|
|
429
|
+
client.datasets.download("example/eval@1.0", "./content", split="test")
|
|
430
|
+
client.profiles.update("example/train@1.0", version="2.0", patch={"params": {"seed": 2}})
|
|
431
|
+
```
|
|
347
432
|
|
|
348
|
-
|
|
433
|
+
Runner is a platform execution capability under Experiment. Its existing package command remains
|
|
434
|
+
`el runner create DIRECTORY --revision FULL_COMMIT`; `runner list --ref REF` and
|
|
435
|
+
`runner download REF --output DIR --content-digest SHA256` use the execution domain.
|
|
436
|
+
Trial Artifact publication is `el trial artifact create --file manifest.json --directory ./outputs`.
|
|
437
|
+
`trial artifact download --ref URI --output DIR --content-digest SHA256` downloads one fixed
|
|
438
|
+
ANS directory; `trial artifact download TRIAL_ID --output DIR` downloads all uploaded Trial files.
|
|
439
|
+
These execution-owned records are excluded from Assets.
|
|
@@ -15,8 +15,9 @@ unreleased features.
|
|
|
15
15
|
|
|
16
16
|
| Unreleased source enhancement | Published 1.33.0 |
|
|
17
17
|
| --- | --- |
|
|
18
|
+
| `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
|
|
18
19
|
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
19
|
-
| `el
|
|
20
|
+
| `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
20
21
|
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
21
22
|
|
|
22
23
|
Execution also requires a matching platform, project permissions and published
|
|
@@ -50,7 +51,7 @@ uv pip install --upgrade envloop-cli
|
|
|
50
51
|
python3.12 -m pip install --upgrade envloop-cli
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
Every installation includes Jobs, Trials, training, logs, inference calls,
|
|
54
|
+
Every installation includes Jobs, Trials, training, logs, inference calls, Assets, checkpoints and RSI Loop controls.
|
|
54
55
|
Check that the SDK can be imported:
|
|
55
56
|
|
|
56
57
|
```bash
|
|
@@ -69,23 +70,38 @@ One `envloop-cli` wheel and source archive contain all feature code. Extras add
|
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
72
|
python -m pip install envloop-cli
|
|
72
|
-
python -m pip install "envloop-cli[
|
|
73
|
-
python -m pip install "envloop-cli[
|
|
73
|
+
python -m pip install "envloop-cli[asset]"
|
|
74
|
+
python -m pip install "envloop-cli[asset,experiment,rsi-loop]"
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
Every installation includes the existing Job, Trial,
|
|
77
|
+
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.
|
|
77
78
|
|
|
78
79
|
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.
|
|
79
80
|
|
|
80
|
-
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
|
|
81
|
+
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:
|
|
81
82
|
|
|
82
83
|
```bash
|
|
83
84
|
python -m pip uninstall -y envloop-cli envloop-cli-experiment
|
|
84
|
-
python -m pip install "envloop-cli[
|
|
85
|
+
python -m pip install "envloop-cli[asset]"
|
|
85
86
|
```
|
|
86
87
|
|
|
87
88
|
## Connect
|
|
88
89
|
|
|
90
|
+
For Job-bound chat, install the optional dependency in the same environment:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
python -m pip install "envloop-cli[chat]"
|
|
94
|
+
el job chat JOB_ID "Introduce yourself."
|
|
95
|
+
el job chat JOB_ID
|
|
96
|
+
el job chat JOB_ID "Hello" --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Text answers stream by default. `--json` returns one complete response.
|
|
100
|
+
The command uses the configured EnvLoop connection and automatically reads the
|
|
101
|
+
Job's model. The `chat` extra uses the official OpenAI Python SDK against EnvLoop;
|
|
102
|
+
it does not use an OpenAI account. `/clear` resets terminal history, `/exit` leaves,
|
|
103
|
+
and Ctrl+C exits without stopping the Job.
|
|
104
|
+
|
|
89
105
|
Use an authorized EnvLoop account and project. Browser authorization:
|
|
90
106
|
|
|
91
107
|
```bash
|
|
@@ -187,7 +203,9 @@ el job submit --type train --profile team/sft@3 \
|
|
|
187
203
|
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
188
204
|
```
|
|
189
205
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
190
|
-
retain their case and duplicates are rejected.
|
|
206
|
+
retain their case and duplicates are rejected. Without input overrides, v4/v5
|
|
207
|
+
Profiles use a canonical JobSpec after one public schema lookup; explicit values
|
|
208
|
+
go in `overrides`, while the platform freezes Profile defaults and inputs.
|
|
191
209
|
|
|
192
210
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
193
211
|
Sandbox Job without a Dataset:
|
|
@@ -195,17 +213,34 @@ Sandbox Job without a Dataset:
|
|
|
195
213
|
```bash
|
|
196
214
|
el job submit --type sandbox --runner base --command 'python --version'
|
|
197
215
|
el job submit --type sandbox --runner base --image python:3.11 --wait
|
|
216
|
+
el job submit --type sandbox --provider e2b --spec REQUEST.json
|
|
198
217
|
el job list --type sandbox
|
|
199
218
|
el job log JOB_ID --follow
|
|
200
219
|
```
|
|
201
220
|
|
|
202
221
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
203
222
|
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
204
|
-
`--image` accepts an image name, tag or digest.
|
|
205
|
-
by
|
|
223
|
+
`--image` accepts an image name, tag or digest. Bench and Sandbox submissions can request a
|
|
224
|
+
platform-enabled provider by name. In a request file, `provider` is a
|
|
225
|
+
top-level field alongside `spec` and optional `overrides` in an `envloop.job/v2`
|
|
226
|
+
envelope. The `--provider` flag overrides that field and also works with the
|
|
227
|
+
named `--profile` shortcut. Omit the selection to use the platform default.
|
|
228
|
+
Job logs retain the actual captured output and collection metadata.
|
|
206
229
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
207
230
|
recovery guidance without echoing arbitrary response bodies or credentials.
|
|
208
231
|
|
|
232
|
+
Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
|
|
233
|
+
JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
el job submit --type sandbox --spec REQUEST.json --harbor_env process
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Omitting the option preserves spec/Profile parameters and the Runner default
|
|
240
|
+
(`docker`). An explicit option overrides the file's `harbor_env` parameter;
|
|
241
|
+
setting the same key with `--params` is rejected. The option selects Harbor's
|
|
242
|
+
task environment; platform execution placement remains server configured.
|
|
243
|
+
|
|
209
244
|
## Existing installations
|
|
210
245
|
|
|
211
246
|
This distribution provides both the CLI and the `envloop` import package. Use a
|
|
@@ -230,6 +265,7 @@ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://doc
|
|
|
230
265
|
Training uses billable resources. Check your project permissions, balance and data format, then submit once:
|
|
231
266
|
|
|
232
267
|
```bash
|
|
268
|
+
el job resolve --spec REQUEST.json --json
|
|
233
269
|
el job submit --type train --spec REQUEST.json
|
|
234
270
|
el job get JOB_ID
|
|
235
271
|
el job log JOB_ID --follow
|
|
@@ -239,9 +275,19 @@ el checkpoint list --job-id JOB_ID
|
|
|
239
275
|
|
|
240
276
|
`job submit --spec` reads the complete Job specification JSON file for Train or Inference.
|
|
241
277
|
The former `job submit --file` option is removed; the JSON payload is unchanged.
|
|
278
|
+
`job resolve --spec FILE --json` previews the resolved specification without creating a Job.
|
|
279
|
+
Artifact downloads transfer directly from object storage and require `envloop-cli[asset]`; without it they stop with `FEATURE_NOT_INSTALLED` and the install command.
|
|
242
280
|
|
|
243
281
|
Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
|
|
244
282
|
Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
|
|
283
|
+
A platform-authorized Train worker publishes its saved checkpoints directly to object storage:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
el checkpoint create --result /output/train-result.json --directory /output --json
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
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.
|
|
290
|
+
|
|
245
291
|
See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
|
|
246
292
|
|
|
247
293
|
The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
|
|
@@ -304,28 +350,70 @@ Use the exact model returned by the Job. The SDK forwards the payload to the
|
|
|
304
350
|
Job's `/inference/decision` API; the approved plugin validates its business fields.
|
|
305
351
|
Availability requires matching platform support and approved content in your project.
|
|
306
352
|
|
|
307
|
-
##
|
|
353
|
+
## User Assets and verified downloads
|
|
308
354
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
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`:
|
|
355
|
+
Datasets, Checkpoints, Recipes and Profiles share `list`, `get`, `create`, `update`, `delete`
|
|
356
|
+
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`; a bare name is rejected.
|
|
358
|
+
`get/create/update` return `{ "asset": RECORD_OR_NULL, "operation": OPERATION_OR_NULL }`.
|
|
359
|
+
Records share `asset_id/type/name/version/owner/visibility/acl_revision/status`; type details,
|
|
360
|
+
files, model identity and provenance stay in `asset.details`.
|
|
316
361
|
|
|
317
362
|
```bash
|
|
318
|
-
el
|
|
319
|
-
el
|
|
320
|
-
el
|
|
363
|
+
el dataset list --name example/eval --json
|
|
364
|
+
el dataset create --file dataset.json --directory ./files --tags 'topic:finance' --wait
|
|
365
|
+
el dataset get example/eval@1.0 --json
|
|
366
|
+
el dataset file list example/eval@1.0
|
|
367
|
+
el dataset download example/eval@1.0 --split test --output ./content
|
|
368
|
+
el dataset create --format harbor --directory ./tasks --name example/eval --version 1.0
|
|
369
|
+
el dataset registration create example/eval@1.0 --runner envloop/harbor@FULL_COMMIT --wait
|
|
370
|
+
el recipe create --directory ./recipe --revision FULL_COMMIT --wait
|
|
371
|
+
el checkpoint create --model example/model --revision FULL_MODEL_COMMIT
|
|
372
|
+
el checkpoint create --result train-result.json --checkpoint-name checkpoint-100 --directory ./outputs
|
|
373
|
+
el profile create --name example/train --version 1.0 --file profile.toml --secret HF_TOKEN=env:HF_TOKEN
|
|
374
|
+
el profile update example/train@1.0 --version 2.0 --patch changes.toml
|
|
375
|
+
el profile export example/train@2.0 --output ./profile.toml
|
|
376
|
+
el dataset set-visibility example/eval@1.0 --visibility internal --expected-acl-revision 3
|
|
321
377
|
```
|
|
322
378
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
379
|
+
`--file` supplies a complete declaration; `--patch` is Profile update's explicit patch mode.
|
|
380
|
+
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`.
|
|
382
|
+
Profile supports private/public; other user content also supports internal. The returned ACL scope
|
|
383
|
+
states whether sharing affects a name's versions or one saved record. Every visibility write requires
|
|
384
|
+
an explicit `--expected-acl-revision`.
|
|
385
|
+
|
|
386
|
+
A create/update establishes a unique publication operation and transfers verified bytes. Without
|
|
387
|
+
`--wait`, pending results preserve the operation ID and may have `asset: null`; an upload or staging
|
|
388
|
+
ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_ID`,
|
|
389
|
+
`upload part UPLOAD_ID --number N --file PART`, `upload complete OPERATION_ID` or
|
|
390
|
+
`upload abort OPERATION_ID` to inspect/resume that operation. Complete is idempotent and is the
|
|
391
|
+
only publication commit; there is no separate upload create command. Failed or timed-out operations
|
|
392
|
+
exit nonzero while preserving their safe receipt. Storage credentials are not printed.
|
|
393
|
+
|
|
394
|
+
Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
|
|
395
|
+
digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
|
|
396
|
+
`download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
|
|
397
|
+
is separate from `get`; Profile uses a redacted `export` instead of a content download.
|
|
398
|
+
|
|
399
|
+
Worker checkpoint publication selects exactly one saved descriptor. Multi-save result files require
|
|
400
|
+
`--checkpoint-name`. Producer identity comes only from the platform-issued worker credential;
|
|
401
|
+
ordinary project keys cannot invent Job/Trial provenance. External HF metadata registration does
|
|
402
|
+
not download weights or establish training provenance.
|
|
403
|
+
|
|
404
|
+
The SDK uses `client.datasets/checkpoints/recipes/profiles` for typed operations and
|
|
405
|
+
`client.assets.list/get` for read-only aggregation. Examples:
|
|
328
406
|
|
|
329
|
-
|
|
407
|
+
```python
|
|
408
|
+
client.datasets.create(manifest=manifest, files=files, wait=True, tags={"topic": "finance"})
|
|
409
|
+
client.datasets.download("example/eval@1.0", "./content", split="test")
|
|
410
|
+
client.profiles.update("example/train@1.0", version="2.0", patch={"params": {"seed": 2}})
|
|
411
|
+
```
|
|
330
412
|
|
|
331
|
-
|
|
413
|
+
Runner is a platform execution capability under Experiment. Its existing package command remains
|
|
414
|
+
`el runner create DIRECTORY --revision FULL_COMMIT`; `runner list --ref REF` and
|
|
415
|
+
`runner download REF --output DIR --content-digest SHA256` use the execution domain.
|
|
416
|
+
Trial Artifact publication is `el trial artifact create --file manifest.json --directory ./outputs`.
|
|
417
|
+
`trial artifact download --ref URI --output DIR --content-digest SHA256` downloads one fixed
|
|
418
|
+
ANS directory; `trial artifact download TRIAL_ID --output DIR` downloads all uploaded Trial files.
|
|
419
|
+
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,18 +79,18 @@ 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
86
|
|
|
87
87
|
|
|
88
88
|
def missing_feature(error: BaseException) -> MissingFeatureError | None:
|
|
89
|
-
"""Treat a deferred import of the public ANS dependency as the missing [
|
|
89
|
+
"""Treat a deferred import of the public ANS dependency as the missing [asset] extra."""
|
|
90
90
|
if isinstance(error, MissingFeatureError):
|
|
91
91
|
return error
|
|
92
92
|
if isinstance(error, ModuleNotFoundError) and isinstance(error.name, str) and error.name.partition('.')[0] == 'envhub':
|
|
93
|
-
return MissingFeatureError('
|
|
93
|
+
return MissingFeatureError('asset')
|
|
94
94
|
return None
|
|
95
95
|
|
|
96
96
|
|
|
@@ -116,8 +116,8 @@ def client_attribute(name: str):
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
def endpoint(name: str):
|
|
119
|
-
if name in
|
|
120
|
-
feature = '
|
|
119
|
+
if name in ASSET_ENDPOINTS:
|
|
120
|
+
feature = 'asset'
|
|
121
121
|
elif name in EXPERIMENT_ENDPOINTS:
|
|
122
122
|
feature = 'experiment'
|
|
123
123
|
else:
|
|
@@ -128,7 +128,7 @@ def endpoint(name: str):
|
|
|
128
128
|
|
|
129
129
|
def navigation(name: str):
|
|
130
130
|
if name in {'Datasets', 'Checkpoints', '_checkpoint_matches', '_checkpoint_target', '_verified_checkpoint_file'}:
|
|
131
|
-
return feature_attribute('
|
|
131
|
+
return feature_attribute('asset', 'navigation_resources', name)
|
|
132
132
|
if name in {'Inference', 'InferenceResource'}:
|
|
133
133
|
return feature_attribute('experiment', 'navigation_resources', name)
|
|
134
134
|
raise AttributeError(name)
|
|
@@ -144,14 +144,18 @@ def client_resource(client: Any, name: str):
|
|
|
144
144
|
return feature_attribute('experiment', 'navigation_resources', 'Dashboard')(client.project, client.jobs, client.training_jobs)
|
|
145
145
|
from .navigation_resources import Dashboard
|
|
146
146
|
return Dashboard(client.project)
|
|
147
|
-
if name
|
|
148
|
-
return feature_attribute('
|
|
149
|
-
if name
|
|
150
|
-
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')
|
|
151
155
|
if name == 'datasets':
|
|
152
|
-
return
|
|
156
|
+
return feature_attribute('asset', 'assets', 'DatasetAssets')(server)
|
|
153
157
|
if name == 'checkpoints':
|
|
154
|
-
return feature_attribute('
|
|
158
|
+
return feature_attribute('asset', 'assets', 'ContentResource')(server, 'checkpoint')
|
|
155
159
|
if name == 'jobs':
|
|
156
160
|
return feature_attribute('experiment', 'client', 'Jobs')(server)
|
|
157
161
|
if name == 'trials':
|
|
@@ -175,9 +179,9 @@ def execute_command(args: argparse.Namespace, client: Any, cli: Any):
|
|
|
175
179
|
if args.group == 'loop':
|
|
176
180
|
return feature_module('rsi-loop', 'loop_cli').execute(args, client)
|
|
177
181
|
if args.group == 'profile':
|
|
178
|
-
return feature_module('
|
|
179
|
-
if args.group in {'
|
|
180
|
-
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)
|
|
181
185
|
from .resource_cli import execute
|
|
182
186
|
return execute(args, client)
|
|
183
187
|
|