envloop-cli 1.32.0__tar.gz → 1.34.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.32.0 → envloop_cli-1.34.0}/PKG-INFO +47 -13
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/README.pypi.md +48 -14
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/_optional.py +18 -4
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/auth_cli.py +48 -8
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/cli.py +6 -13
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/cli_errors.py +101 -22
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/cli_output.py +1 -1
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/http.py +61 -11
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/navigation_resources.py +1 -1
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/profile_secrets.py +46 -1
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/resource_cli.py +31 -4
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/terminal.py +19 -0
- envloop_cli-1.34.0/packages/data/envloop_data/checkpoint_upload.py +94 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/cli.py +2 -0
- envloop_cli-1.34.0/packages/data/envloop_data/cli_output.py +143 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/client.py +62 -9
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/data.py +70 -22
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/data_cli.py +155 -20
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/data_publications.py +11 -3
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/data_upload.py +93 -12
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/http.py +6 -2
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/navigation_resources.py +24 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/profile_updates.py +1 -1
- envloop_cli-1.34.0/packages/data/envloop_data/recipe_packages.py +125 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/recipes.py +1 -1
- envloop_cli-1.34.0/packages/data/envloop_data/resource_cli.py +179 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/runner_packages.py +41 -1
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/cli.py +75 -41
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/client.py +57 -10
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/http.py +14 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/inference.py +18 -2
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/job_spec_cli.py +78 -10
- envloop_cli-1.34.0/packages/experiment/envloop_experiment/named_profile.py +138 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/train.py +2 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/train_runner_cli.py +23 -11
- envloop_cli-1.34.0/packages/rsi-loop/envloop_rsi_loop/cli.py +53 -0
- envloop_cli-1.34.0/packages/rsi-loop/envloop_rsi_loop/cli_output.py +107 -0
- envloop_cli-1.34.0/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +113 -0
- envloop_cli-1.34.0/packages/rsi-loop/envloop_rsi_loop/loops.py +203 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/pyproject.toml +2 -2
- envloop_cli-1.32.0/packages/data/envloop_data/cli_output.py +0 -82
- envloop_cli-1.32.0/packages/data/envloop_data/resource_cli.py +0 -117
- envloop_cli-1.32.0/packages/experiment/envloop_experiment/named_profile.py +0 -62
- envloop_cli-1.32.0/packages/rsi-loop/envloop_rsi_loop/agent_runs.py +0 -249
- envloop_cli-1.32.0/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -33
- envloop_cli-1.32.0/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -73
- envloop_cli-1.32.0/packages/rsi-loop/envloop_rsi_loop/rsi_cli.py +0 -65
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/.gitignore +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/__init__.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/auth_login.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/auth_workspace.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/client.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/config.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/downloads.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/lifecycle_cli.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/resources.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/utils/__init__.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/envloop/utils/logging.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/data/envloop_data/__init__.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/__init__.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/cli_output.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/decision.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/job_cost.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/job_logs.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/navigation_resources.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/resource_cli.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/resources.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/runtime_params.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/sandbox.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/train_progress.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
- {envloop_cli-1.32.0 → envloop_cli-1.34.0}/packages/rsi-loop/envloop_rsi_loop/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: envloop-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.34.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
|
|
@@ -21,17 +21,32 @@ Install the public client to run agent Jobs, inspect Trials, manage training and
|
|
|
21
21
|
checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
|
|
22
22
|
commands are equivalent. The Python import package is `envloop`.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Release compatibility
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
This page describes the current client source. Published 1.33.0 includes
|
|
27
|
+
`runner list|get|create|update|delete`, replacing the `list|register` commands in
|
|
28
|
+
1.32.0. The enhancements below are not in published 1.33.0 and await a new
|
|
29
|
+
release. Check your installed `el --version` and `el COMMAND --help` before
|
|
30
|
+
following an example; the source package version alone does not identify
|
|
31
|
+
unreleased features.
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
| Unreleased source enhancement | Published 1.33.0 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
|
|
36
|
+
| `el data upload harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
|
|
37
|
+
| `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
|
|
38
|
+
|
|
39
|
+
Execution also requires a matching platform, project permissions and published
|
|
40
|
+
Runners; package installation alone does not establish those prerequisites. See the
|
|
33
41
|
[PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
|
|
34
42
|
|
|
43
|
+
Profile v4 requires platform support from [EnvPlatform #1489](https://github.com/EnvLoop/EnvPlatform/pull/1489).
|
|
44
|
+
Running a v6 Runner in a Sandbox also requires the bootstrap fix in
|
|
45
|
+
[EnvPlatform #1490](https://github.com/EnvLoop/EnvPlatform/pull/1490).
|
|
46
|
+
Platform 1.71.0 contains neither change: upgrading the CLI alone does not enable
|
|
47
|
+
these features on that server version. Existing historical Profile formats remain
|
|
48
|
+
available while waiting for a compatible platform release.
|
|
49
|
+
|
|
35
50
|
## Install
|
|
36
51
|
|
|
37
52
|
envloop-cli requires Python 3.12 or later; an existing compatible interpreter can
|
|
@@ -75,7 +90,7 @@ python -m pip install "envloop-cli[data]"
|
|
|
75
90
|
python -m pip install "envloop-cli[data,experiment,rsi-loop]"
|
|
76
91
|
```
|
|
77
92
|
|
|
78
|
-
Every installation includes the existing Job, Trial, Data and RSI Loop commands. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `data` adds `envloop-envhub==1.23.0` for ANS parsing and verified directory downloads. Other Data API operations use the bundled client implementation.
|
|
93
|
+
Every installation includes the existing Job, Trial, Data and RSI Loop commands, and every `--help` works without extras. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `data` adds `envloop-envhub==1.23.0` for ANS parsing, file-manifest publication and verified directory downloads. Other Data API operations use the bundled client implementation. A command that needs the missing ANS dependency stops with `FEATURE_NOT_INSTALLED` and the `envloop-cli[data]` installation instruction.
|
|
79
94
|
|
|
80
95
|
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
96
|
|
|
@@ -127,9 +142,15 @@ disable color. `--json` stdout remains JSON.
|
|
|
127
142
|
```text
|
|
128
143
|
Error: PROFILE_NOT_FOUND
|
|
129
144
|
The Profile was not found or is not readable in the current scope.
|
|
145
|
+
Request: GET /v1/profiles/YWNtZS9leGFtcGxl
|
|
130
146
|
HTTP 404
|
|
131
147
|
```
|
|
132
148
|
|
|
149
|
+
A 404 also names the API request that returned it, without query; resource names
|
|
150
|
+
in the path are base64url-encoded. An API key works only in the workspace and
|
|
151
|
+
project it was issued for; selecting another one returns `API_KEY_SCOPE_MISMATCH`
|
|
152
|
+
(HTTP 403), whose message names both scopes.
|
|
153
|
+
|
|
133
154
|
## Explore your project
|
|
134
155
|
|
|
135
156
|
```bash
|
|
@@ -171,6 +192,17 @@ el job submit --type sandbox --profile team/report@1 --input report=ARTIFACT_URI
|
|
|
171
192
|
The platform resolves and freezes the Runner and inputs, and manages any model
|
|
172
193
|
service declared by the Profile. No local script, Dataset Task wrapper or Runner
|
|
173
194
|
argument is required. Use a published Artifact URI in place of `ARTIFACT_URI`.
|
|
195
|
+
|
|
196
|
+
A Dataset input selects its config and split with `--input-config NAME=CONFIG`
|
|
197
|
+
and `--input-split NAME=SPLIT`; when only one Dataset is bound, `--config` and
|
|
198
|
+
`--split` are shorthands. A Dataset URI alone uses the default config and the
|
|
199
|
+
train split:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
el job submit --type train --profile team/sft@3 \
|
|
203
|
+
--input train_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split train_dataset=train-1 \
|
|
204
|
+
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
205
|
+
```
|
|
174
206
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
175
207
|
retain their case and duplicates are rejected.
|
|
176
208
|
|
|
@@ -185,7 +217,7 @@ el job log JOB_ID --follow
|
|
|
185
217
|
```
|
|
186
218
|
|
|
187
219
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
188
|
-
freezes its immutable Revision. The Sandbox image defaults to
|
|
220
|
+
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
189
221
|
`--image` accepts an image name, tag or digest. The execution provider is configured
|
|
190
222
|
by the server. Job logs retain the actual captured output and collection metadata.
|
|
191
223
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
@@ -264,7 +296,7 @@ CLI output uses compact timestamps and highlights statuses and log levels by def
|
|
|
264
296
|
Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
|
|
265
297
|
`NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
|
|
266
298
|
List and table times are UTC with a `UTC` label; Job logs retain the recorded timezone and mark lines collected only after the Job ended with `(backfilled)`. Full precision, offsets and the `backfilled` field are available through `--json`.
|
|
267
|
-
`el
|
|
299
|
+
`el loop live LOOP_ID --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Loop.
|
|
268
300
|
|
|
269
301
|
## Job-bound decision plugins
|
|
270
302
|
|
|
@@ -305,9 +337,11 @@ el data get DATA_ID --json
|
|
|
305
337
|
el data download DATA_ID --file FILE_ID --output ./dataset.tgz --resume --json
|
|
306
338
|
```
|
|
307
339
|
|
|
308
|
-
Unified ANS CRUD supports Dataset, Runner, Recipe and HF model Checkpoint registrations through `el data` and `client.data`. Dataset/Runner/Recipe creation requires a native `--manifest` and exact `--directory
|
|
340
|
+
Unified ANS CRUD supports Dataset, Runner, Recipe and HF model Checkpoint registrations through `el data` and `client.data`. Dataset/Runner/Recipe creation requires a native `--manifest` and exact `--directory`; a Recipe may instead be built from a directory holding a committed `recipe.toml` (`envloop.recipe/v2`) and `entrypoint.sh` with `el data create --type recipe --directory DIR [--revision REF]` (SDK `client.data.create(type="recipe", directory=DIR)`). For Dataset create/update/upload, `--ref` (SDK `ref`) is optional when `dataset.namespace`, `dataset.name` and `dataset.version` are present in the manifest; EnvHub derives the immutable Dataset URI. Other resource types and manifests without that identity still require an explicit ref. Explicit refs remain supported; the platform validates their consistency with the manifest. HF metadata registration uses `el data create --type checkpoint --model namespace/model --revision FULL_COMMIT`; SDK uses `create(kind="checkpoint", model=..., revision=...)`. HF weights are not downloaded, and artifact imports do not establish Model or Job checkpoint provenance. While native publication runs, `create`/`update` repeat the same idempotent request until ready (`--timeout`, default 3600 s); `--no-wait` / `wait=False` returns the pending `publishing` resource with resume instructions.
|
|
341
|
+
|
|
342
|
+
`el data upload harbor DIR --name NAMESPACE/NAME --version VERSION` (SDK `client.data.upload(DIR, dataset=..., version=...)`) checks the directory before uploading and lists every Task whose `[[tasks]] digest` in `dataset.toml` no longer matches its files. After reviewing the Task changes, add `--update-digests` (SDK `update_digests=True`) to rewrite only those digest values, using the same Task fingerprint that registration verifies; nothing is written when the digests already match or the directory fails any other check, and the rewrite is reported on stderr (`updated_digests` in the JSON). A version that was already published stays immutable on the platform: publish changed Tasks under a new version.
|
|
309
343
|
|
|
310
|
-
`el runner
|
|
344
|
+
`el runner create DIRECTORY [--revision FULL_COMMIT|BRANCH|TAG] [--source-ref main]` (default `--revision main`, resolved locally and refused unless the directory matches that commit) publishes a Runner package directory through the same Data API with the manifest built for you, then reads the catalog revision back. `el profile create|update|fork ... --secret NAME[=prompt|stdin|env:VAR|file:PATH]` stores write-only Secret parameters whose names follow the platform's credential rule or `secret_params`; values never come from the command line. `el setting model-access grant NAMESPACE/NAME --protocol anthropic [--revision FULL_COMMIT]` (project Admin) lets a published Runner receive the project's metered model key on Fly Trials; `list` and `revoke GRANT_ID` manage grants.
|
|
311
345
|
|
|
312
346
|
Success follows native storage and original catalog readback and returns an `ans_` identity. Update publishes an explicit new revision. Delete checks active and unknown dependencies; Runner deletion covers all revisions. Historical bytes and quota usage remain. Commands default to the current login base URL/workspace/project, with no `--env`. Both Data grants and the corresponding resource capabilities are required.
|
|
313
347
|
|
|
@@ -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 data upload 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
|
|
@@ -58,7 +73,7 @@ python -m pip install "envloop-cli[data]"
|
|
|
58
73
|
python -m pip install "envloop-cli[data,experiment,rsi-loop]"
|
|
59
74
|
```
|
|
60
75
|
|
|
61
|
-
Every installation includes the existing Job, Trial, Data and RSI Loop commands. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `data` adds `envloop-envhub==1.23.0` for ANS parsing and verified directory downloads. Other Data API operations use the bundled client implementation.
|
|
76
|
+
Every installation includes the existing Job, Trial, Data and RSI Loop commands, and every `--help` works without extras. The bare installation and `default`, `experiment`, `rsi-loop` groups have no runtime dependencies. `data` adds `envloop-envhub==1.23.0` for ANS parsing, file-manifest publication and verified directory downloads. Other Data API operations use the bundled client implementation. A command that needs the missing ANS dependency stops with `FEATURE_NOT_INSTALLED` and the `envloop-cli[data]` 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
|
|
|
@@ -110,9 +125,15 @@ disable color. `--json` stdout remains JSON.
|
|
|
110
125
|
```text
|
|
111
126
|
Error: PROFILE_NOT_FOUND
|
|
112
127
|
The Profile was not found or is not readable in the current scope.
|
|
128
|
+
Request: GET /v1/profiles/YWNtZS9leGFtcGxl
|
|
113
129
|
HTTP 404
|
|
114
130
|
```
|
|
115
131
|
|
|
132
|
+
A 404 also names the API request that returned it, without query; resource names
|
|
133
|
+
in the path are base64url-encoded. An API key works only in the workspace and
|
|
134
|
+
project it was issued for; selecting another one returns `API_KEY_SCOPE_MISMATCH`
|
|
135
|
+
(HTTP 403), whose message names both scopes.
|
|
136
|
+
|
|
116
137
|
## Explore your project
|
|
117
138
|
|
|
118
139
|
```bash
|
|
@@ -154,6 +175,17 @@ el job submit --type sandbox --profile team/report@1 --input report=ARTIFACT_URI
|
|
|
154
175
|
The platform resolves and freezes the Runner and inputs, and manages any model
|
|
155
176
|
service declared by the Profile. No local script, Dataset Task wrapper or Runner
|
|
156
177
|
argument is required. Use a published Artifact URI in place of `ARTIFACT_URI`.
|
|
178
|
+
|
|
179
|
+
A Dataset input selects its config and split with `--input-config NAME=CONFIG`
|
|
180
|
+
and `--input-split NAME=SPLIT`; when only one Dataset is bound, `--config` and
|
|
181
|
+
`--split` are shorthands. A Dataset URI alone uses the default config and the
|
|
182
|
+
train split:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
el job submit --type train --profile team/sft@3 \
|
|
186
|
+
--input train_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split train_dataset=train-1 \
|
|
187
|
+
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
188
|
+
```
|
|
157
189
|
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
158
190
|
retain their case and duplicates are rejected.
|
|
159
191
|
|
|
@@ -168,7 +200,7 @@ el job log JOB_ID --follow
|
|
|
168
200
|
```
|
|
169
201
|
|
|
170
202
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
171
|
-
freezes its immutable Revision. The Sandbox image defaults to
|
|
203
|
+
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
172
204
|
`--image` accepts an image name, tag or digest. The execution provider is configured
|
|
173
205
|
by the server. Job logs retain the actual captured output and collection metadata.
|
|
174
206
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
@@ -247,7 +279,7 @@ CLI output uses compact timestamps and highlights statuses and log levels by def
|
|
|
247
279
|
Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
|
|
248
280
|
`NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
|
|
249
281
|
List and table times are UTC with a `UTC` label; Job logs retain the recorded timezone and mark lines collected only after the Job ended with `(backfilled)`. Full precision, offsets and the `backfilled` field are available through `--json`.
|
|
250
|
-
`el
|
|
282
|
+
`el loop live LOOP_ID --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Loop.
|
|
251
283
|
|
|
252
284
|
## Job-bound decision plugins
|
|
253
285
|
|
|
@@ -288,9 +320,11 @@ el data get DATA_ID --json
|
|
|
288
320
|
el data download DATA_ID --file FILE_ID --output ./dataset.tgz --resume --json
|
|
289
321
|
```
|
|
290
322
|
|
|
291
|
-
Unified ANS CRUD supports Dataset, Runner, Recipe and HF model Checkpoint registrations through `el data` and `client.data`. Dataset/Runner/Recipe creation requires a native `--manifest` and exact `--directory
|
|
323
|
+
Unified ANS CRUD supports Dataset, Runner, Recipe and HF model Checkpoint registrations through `el data` and `client.data`. Dataset/Runner/Recipe creation requires a native `--manifest` and exact `--directory`; a Recipe may instead be built from a directory holding a committed `recipe.toml` (`envloop.recipe/v2`) and `entrypoint.sh` with `el data create --type recipe --directory DIR [--revision REF]` (SDK `client.data.create(type="recipe", directory=DIR)`). For Dataset create/update/upload, `--ref` (SDK `ref`) is optional when `dataset.namespace`, `dataset.name` and `dataset.version` are present in the manifest; EnvHub derives the immutable Dataset URI. Other resource types and manifests without that identity still require an explicit ref. Explicit refs remain supported; the platform validates their consistency with the manifest. HF metadata registration uses `el data create --type checkpoint --model namespace/model --revision FULL_COMMIT`; SDK uses `create(kind="checkpoint", model=..., revision=...)`. HF weights are not downloaded, and artifact imports do not establish Model or Job checkpoint provenance. While native publication runs, `create`/`update` repeat the same idempotent request until ready (`--timeout`, default 3600 s); `--no-wait` / `wait=False` returns the pending `publishing` resource with resume instructions.
|
|
324
|
+
|
|
325
|
+
`el data upload harbor DIR --name NAMESPACE/NAME --version VERSION` (SDK `client.data.upload(DIR, dataset=..., version=...)`) checks the directory before uploading and lists every Task whose `[[tasks]] digest` in `dataset.toml` no longer matches its files. After reviewing the Task changes, add `--update-digests` (SDK `update_digests=True`) to rewrite only those digest values, using the same Task fingerprint that registration verifies; nothing is written when the digests already match or the directory fails any other check, and the rewrite is reported on stderr (`updated_digests` in the JSON). A version that was already published stays immutable on the platform: publish changed Tasks under a new version.
|
|
292
326
|
|
|
293
|
-
`el runner
|
|
327
|
+
`el runner create DIRECTORY [--revision FULL_COMMIT|BRANCH|TAG] [--source-ref main]` (default `--revision main`, resolved locally and refused unless the directory matches that commit) publishes a Runner package directory through the same Data API with the manifest built for you, then reads the catalog revision back. `el profile create|update|fork ... --secret NAME[=prompt|stdin|env:VAR|file:PATH]` stores write-only Secret parameters whose names follow the platform's credential rule or `secret_params`; values never come from the command line. `el setting model-access grant NAMESPACE/NAME --protocol anthropic [--revision FULL_COMMIT]` (project Admin) lets a published Runner receive the project's metered model key on Fly Trials; `list` and `revoke GRANT_ID` manage grants.
|
|
294
328
|
|
|
295
329
|
Success follows native storage and original catalog readback and returns an `ans_` identity. Update publishes an explicit new revision. Delete checks active and unknown dependencies; Runner deletion covers all revisions. Historical bytes and quota usage remain. Commands default to the current login base URL/workspace/project, with no `--env`. Both Data grants and the corresponding resource capabilities are required.
|
|
296
330
|
|
|
@@ -19,19 +19,22 @@ FEATURE_COMMANDS = {
|
|
|
19
19
|
'dataset': 'Discover Datasets, revisions and tasks',
|
|
20
20
|
'data': 'Manage versioned Data resources and verified file downloads',
|
|
21
21
|
'runner': 'Discover available Runner revisions',
|
|
22
|
-
'checkpoint': 'List and download saved training Checkpoints',
|
|
22
|
+
'checkpoint': 'List, share and download saved training Checkpoints',
|
|
23
23
|
'profile': 'Manage platform runtime Profiles',
|
|
24
24
|
},
|
|
25
25
|
'experiment': {
|
|
26
26
|
'job': 'Submit and manage Agent, Sandbox, Train and Inference Jobs',
|
|
27
27
|
'trial': 'Inspect and control existing Trials',
|
|
28
28
|
},
|
|
29
|
+
'rsi-loop': {
|
|
30
|
+
'loop': 'Start, observe and steer RSI Loops and their Iterations',
|
|
31
|
+
},
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
MODULES: dict[str, str] = {
|
|
32
35
|
**dict.fromkeys('data data_publications data_upload data_cli profile_updates recipes'.split(), 'data'),
|
|
33
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'),
|
|
34
|
-
**dict.fromkeys('
|
|
37
|
+
**dict.fromkeys('loops'.split(), 'rsi-loop'),
|
|
35
38
|
}
|
|
36
39
|
CLIENTS = {
|
|
37
40
|
**{name: ('data', 'client') for name in ('ProfileService', 'RunnerService', 'Profiles', 'Runners')},
|
|
@@ -82,6 +85,15 @@ def require_data_dependencies():
|
|
|
82
85
|
raise MissingFeatureError('data')
|
|
83
86
|
|
|
84
87
|
|
|
88
|
+
def missing_feature(error: BaseException) -> MissingFeatureError | None:
|
|
89
|
+
"""Treat a deferred import of the public ANS dependency as the missing [data] 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('data')
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
|
|
85
97
|
def feature_module(feature: str, module: str):
|
|
86
98
|
if not available(feature):
|
|
87
99
|
raise IncompleteInstallationError(feature)
|
|
@@ -148,8 +160,8 @@ def client_resource(client: Any, name: str):
|
|
|
148
160
|
return feature_attribute('experiment', 'train', 'TrainJobs')(server)
|
|
149
161
|
if name == 'decision':
|
|
150
162
|
return feature_attribute('experiment', 'decision', 'DecisionClient')(server)
|
|
151
|
-
if name == '
|
|
152
|
-
return feature_attribute('rsi-loop', '
|
|
163
|
+
if name == 'loops':
|
|
164
|
+
return feature_attribute('rsi-loop', 'loops', 'Loops')(client.training_jobs)
|
|
153
165
|
if name in {'endpoints', 'adapters'}:
|
|
154
166
|
return feature_attribute('experiment', 'resources', name.capitalize())(server)
|
|
155
167
|
if name == 'inference':
|
|
@@ -160,6 +172,8 @@ def client_resource(client: Any, name: str):
|
|
|
160
172
|
def execute_command(args: argparse.Namespace, client: Any, cli: Any):
|
|
161
173
|
if args.group in {'job', 'trial'}:
|
|
162
174
|
return getattr(feature_module('experiment', 'cli'), 'execute_' + args.group)(args, client, cli)
|
|
175
|
+
if args.group == 'loop':
|
|
176
|
+
return feature_module('rsi-loop', 'loop_cli').execute(args, client)
|
|
163
177
|
if args.group == 'profile':
|
|
164
178
|
return feature_module('data', 'cli').execute_profile(args, client, cli)
|
|
165
179
|
if args.group in {'data', 'dataset', 'runner', 'checkpoint'}:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import argparse
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import re
|
|
5
6
|
import sys
|
|
6
7
|
from typing import Any, cast
|
|
7
8
|
|
|
@@ -43,8 +44,9 @@ def add_auth_commands(groups: "argparse._SubParsersAction[argparse.ArgumentParse
|
|
|
43
44
|
show.add_argument("--json", action="store_true")
|
|
44
45
|
remove = actions.add_parser("unset", help="Delete a saved field; does not revoke the server key")
|
|
45
46
|
remove.add_argument("field", metavar="FIELD", choices=CONFIG_FIELDS, help=FIELD_HELP)
|
|
46
|
-
status = commands.add_parser("status", help="Inspect local credentials; --check verifies
|
|
47
|
-
status.add_argument("--check", action="store_true",
|
|
47
|
+
status = commands.add_parser("status", help="Inspect local credentials; --check verifies them with the API")
|
|
48
|
+
status.add_argument("--check", action="store_true",
|
|
49
|
+
help="Confirm the API key and scope with GET /v1/me; other read probes are reported as warnings")
|
|
48
50
|
status.add_argument("--json", action="store_true")
|
|
49
51
|
commands.add_parser("logout", help="Remove the saved key for the stored default Base URL (local only)")
|
|
50
52
|
workspace = commands.add_parser("workspace", help="Select and verify the active Workspace")
|
|
@@ -113,13 +115,14 @@ def _report(args: argparse.Namespace, store: ConfigStore):
|
|
|
113
115
|
from .cli import resolve_cli_connection
|
|
114
116
|
|
|
115
117
|
connection = resolve_cli_connection()
|
|
116
|
-
|
|
118
|
+
report: dict[str, Any] = {
|
|
117
119
|
"saved": {**saved, "api_key": "configured" if configured else "missing"},
|
|
118
120
|
"effective": {"api_url": connection.api_url, "workspace_id": connection.workspace_id, "project_id": connection.project_id,
|
|
119
121
|
"api_key": "configured" if connection.api_key is not None else "missing"},
|
|
120
122
|
"sources": connection.sources,
|
|
121
123
|
"check": "not_checked",
|
|
122
|
-
}
|
|
124
|
+
}
|
|
125
|
+
return report, connection
|
|
123
126
|
|
|
124
127
|
|
|
125
128
|
def _verify_key(url: str, key: str, workspace_id: str | None = None, project_id: str | None = None):
|
|
@@ -164,6 +167,8 @@ def _print(report: dict[str, Any], as_json: bool = False) -> None:
|
|
|
164
167
|
print(f"Saved workspace: {report['saved'].get('workspace_id') or 'server default'}")
|
|
165
168
|
print(f"Saved project: {report['saved'].get('project_id') or 'key scope'}")
|
|
166
169
|
print(f"Check: {report['check']}")
|
|
170
|
+
for name, result in report.get("probes", {}).items():
|
|
171
|
+
print(f"Probe {name}: {result}")
|
|
167
172
|
|
|
168
173
|
|
|
169
174
|
def run_auth(args: argparse.Namespace, parser: argparse.ArgumentParser):
|
|
@@ -278,10 +283,14 @@ def run_auth(args: argparse.Namespace, parser: argparse.ArgumentParser):
|
|
|
278
283
|
|
|
279
284
|
try:
|
|
280
285
|
require_remote(connection)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
if connection.api_key is None:
|
|
287
|
+
raise ConfigError('API_KEY_REQUIRED')
|
|
288
|
+
service = HttpService(connection.api_url, api_key=connection.api_key,
|
|
289
|
+
workspace_id=connection.workspace_id, project_id=connection.project_id,
|
|
290
|
+
config=False, environment=False)
|
|
291
|
+
# `/v1/me` is the identity check; it alone decides whether the key works.
|
|
292
|
+
_confirm_identity(service.request("GET", "/v1/me"), connection.workspace_id, connection.project_id)
|
|
293
|
+
report["check"] = "access_confirmed"
|
|
285
294
|
except (ConfigError, RemoteError) as error:
|
|
286
295
|
from .cli_errors import format_error, safe_error_code
|
|
287
296
|
|
|
@@ -291,5 +300,36 @@ def run_auth(args: argparse.Namespace, parser: argparse.ArgumentParser):
|
|
|
291
300
|
_print(report, args.json)
|
|
292
301
|
print(format_error(error), file=sys.stderr)
|
|
293
302
|
return 1
|
|
303
|
+
# Further probes describe service health, not the credential: report them as warnings.
|
|
304
|
+
report["probes"], report["warnings"] = _probe(service)
|
|
294
305
|
_print(report, getattr(args, "json", False))
|
|
306
|
+
for warning in report.get("warnings", []):
|
|
307
|
+
print("Warning: " + warning, file=sys.stderr)
|
|
295
308
|
return 0
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
def _confirm_identity(response: Any, workspace_id: str | None, project_id: str | None) -> None:
|
|
312
|
+
"""Require API key authentication; when the server names the scope, it must match the selected one."""
|
|
313
|
+
if not isinstance(response, dict) or response.get("auth_method") != "api_key":
|
|
314
|
+
raise ConfigError("AUTH_CHECK_UNCONFIRMED")
|
|
315
|
+
if response.get("workspace") is not None:
|
|
316
|
+
from .auth_workspace import _scope
|
|
317
|
+
|
|
318
|
+
_scope(response, workspace_id, project_id)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def _probe(service: Any) -> tuple[dict[str, str], list[str]]:
|
|
322
|
+
"""Read one Job page; a failure here is a service problem, not a credential problem."""
|
|
323
|
+
from .cli_errors import safe_error_code
|
|
324
|
+
from .http import RemoteError
|
|
325
|
+
|
|
326
|
+
try:
|
|
327
|
+
service.list_jobs(limit=1)
|
|
328
|
+
return {"jobs": "ok"}, []
|
|
329
|
+
except RemoteError as error:
|
|
330
|
+
code = error.code if isinstance(error.code, str) and re.fullmatch(r"[A-Z0-9_]{1,128}", error.code) else safe_error_code(error)
|
|
331
|
+
status = error.status_code if isinstance(error.status_code, int) and 100 <= error.status_code <= 599 else None
|
|
332
|
+
retry = status is None or status >= 500
|
|
333
|
+
return {"jobs": code}, [f"GET /v1/jobs failed with {code}" + (f" (HTTP {status})" if status else "")
|
|
334
|
+
+ "; the API key is authenticated, but this request did not succeed."
|
|
335
|
+
+ (" The service may be degraded; retry later." if retry else "")]
|
|
@@ -14,7 +14,7 @@ from .http import CLI_VERSION
|
|
|
14
14
|
|
|
15
15
|
SECTIONS = {
|
|
16
16
|
'OVERVIEW': ('dashboard',),
|
|
17
|
-
'EXPERIMENT': ('job', 'trial'),
|
|
17
|
+
'EXPERIMENT': ('job', 'trial', 'loop'),
|
|
18
18
|
'DATA': ('dataset', 'data', 'runner', 'checkpoint', 'profile'),
|
|
19
19
|
'MANAGE': ('billing', 'limit', 'member', 'setting'),
|
|
20
20
|
'TOOLS': ('auth', 'help'),
|
|
@@ -227,16 +227,11 @@ def _main(argv: list[str] | None = None):
|
|
|
227
227
|
from ._optional import IncompleteInstallationError, available
|
|
228
228
|
requested = next((value for value in argv if not value.startswith('-')), None)
|
|
229
229
|
feature = cast(dict[str | None, str], {'job': 'experiment', 'trial': 'experiment', 'data': 'data', 'dataset': 'data',
|
|
230
|
-
'runner': 'data', 'checkpoint': 'data', 'profile': 'data'}).get(requested)
|
|
230
|
+
'runner': 'data', 'checkpoint': 'data', 'profile': 'data', 'loop': 'rsi-loop'}).get(requested)
|
|
231
231
|
if feature is not None and not available(feature):
|
|
232
232
|
from .cli_errors import format_error
|
|
233
233
|
print(format_error(IncompleteInstallationError(feature)), file=sys.stderr)
|
|
234
234
|
return 1
|
|
235
|
-
job_action = next((value for value in argv[argv.index('job') + 1:] if not value.startswith('-')), None) if requested == 'job' else None
|
|
236
|
-
if job_action == 'run' and not available('rsi-loop'):
|
|
237
|
-
from .cli_errors import format_error
|
|
238
|
-
print(format_error(IncompleteInstallationError('rsi-loop')), file=sys.stderr)
|
|
239
|
-
return 1
|
|
240
235
|
args = cli.parse_args(argv)
|
|
241
236
|
if args.group == "help":
|
|
242
237
|
cli.parse_args([*args.command, "--help"])
|
|
@@ -265,6 +260,9 @@ def _main(argv: list[str] | None = None):
|
|
|
265
260
|
if args.group == 'setting' and args.action == 'update' and not any(getattr(args, key) is not None for key in ('name', 'slug', 'region')):
|
|
266
261
|
cli.error('provide at least one of --name, --slug or --region')
|
|
267
262
|
try:
|
|
263
|
+
if args.group == 'loop':
|
|
264
|
+
from ._optional import feature_module
|
|
265
|
+
feature_module('rsi-loop', 'loop_cli').validate(args)
|
|
268
266
|
resolved = resolve_cli_connection(args.api_url, args.workspace_id)
|
|
269
267
|
args.api_url = resolved.api_url
|
|
270
268
|
connection = Client.remote(args.api_url, api_key=resolved.api_key, workspace_id=resolved.workspace_id,
|
|
@@ -279,12 +277,7 @@ def _main(argv: list[str] | None = None):
|
|
|
279
277
|
if result.get('status') in {'FAILED', 'CANCELLED', 'RETRYABLE_FAILED', 'BLOCKED'}:
|
|
280
278
|
raise CleanupError(result)
|
|
281
279
|
result = operation_output(result)
|
|
282
|
-
if args.
|
|
283
|
-
from .cli_output import run_output
|
|
284
|
-
|
|
285
|
-
print(run_output(result))
|
|
286
|
-
elif (args.action == 'list' or getattr(args, '_list_view', False)
|
|
287
|
-
or (args.group == 'job' and args.action == 'run' and args.run_action == 'list')) and not args.json:
|
|
280
|
+
if (args.action == 'list' or getattr(args, '_list_view', False)) and not args.json:
|
|
288
281
|
from .cli_output import list_output
|
|
289
282
|
|
|
290
283
|
print(list_output(result, args, cli.prog))
|