envloop-cli 1.31.0__tar.gz → 1.33.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.31.0 → envloop_cli-1.33.0}/.gitignore +1 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/PKG-INFO +38 -7
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/README.pypi.md +37 -6
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/_optional.py +10 -5
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/auth_cli.py +48 -8
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/cli.py +6 -13
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/cli_errors.py +102 -14
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/cli_output.py +1 -1
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/client.py +2 -2
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/http.py +64 -13
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/navigation_resources.py +1 -1
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/profile_secrets.py +59 -3
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/resource_cli.py +31 -4
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/terminal.py +19 -0
- envloop_cli-1.33.0/packages/data/envloop_data/checkpoint_upload.py +94 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/cli.py +20 -3
- envloop_cli-1.33.0/packages/data/envloop_data/cli_output.py +143 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/client.py +99 -13
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/data.py +192 -25
- envloop_cli-1.33.0/packages/data/envloop_data/data_cli.py +442 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/data_publications.py +45 -3
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/data_upload.py +15 -7
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/http.py +21 -2
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/navigation_resources.py +24 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/profile_updates.py +2 -1
- envloop_cli-1.33.0/packages/data/envloop_data/recipe_packages.py +125 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/recipes.py +4 -3
- envloop_cli-1.33.0/packages/data/envloop_data/resource_cli.py +175 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/runner_packages.py +41 -1
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/cli.py +92 -34
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/client.py +76 -7
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/inference.py +18 -2
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/job_spec_cli.py +78 -10
- envloop_cli-1.33.0/packages/experiment/envloop_experiment/named_profile.py +138 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/runtime_params.py +6 -3
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/train.py +12 -4
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/train_runner_cli.py +23 -11
- envloop_cli-1.33.0/packages/rsi-loop/envloop_rsi_loop/cli.py +53 -0
- envloop_cli-1.33.0/packages/rsi-loop/envloop_rsi_loop/cli_output.py +107 -0
- envloop_cli-1.33.0/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +113 -0
- envloop_cli-1.33.0/packages/rsi-loop/envloop_rsi_loop/loops.py +203 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/pyproject.toml +2 -2
- envloop_cli-1.31.0/packages/data/envloop_data/cli_output.py +0 -82
- envloop_cli-1.31.0/packages/data/envloop_data/data_cli.py +0 -237
- envloop_cli-1.31.0/packages/data/envloop_data/resource_cli.py +0 -117
- envloop_cli-1.31.0/packages/rsi-loop/envloop_rsi_loop/agent_runs.py +0 -249
- envloop_cli-1.31.0/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -33
- envloop_cli-1.31.0/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -73
- envloop_cli-1.31.0/packages/rsi-loop/envloop_rsi_loop/rsi_cli.py +0 -65
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/__init__.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/auth_login.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/auth_workspace.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/config.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/downloads.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/lifecycle_cli.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/resources.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/utils/__init__.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/envloop/utils/logging.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/data/envloop_data/__init__.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/__init__.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/cli_output.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/decision.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/http.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/job_cost.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/job_logs.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/navigation_resources.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/resource_cli.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/resources.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/sandbox.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/train_progress.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.0}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
- {envloop_cli-1.31.0 → envloop_cli-1.33.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.33.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
|
|
@@ -127,9 +127,15 @@ disable color. `--json` stdout remains JSON.
|
|
|
127
127
|
```text
|
|
128
128
|
Error: PROFILE_NOT_FOUND
|
|
129
129
|
The Profile was not found or is not readable in the current scope.
|
|
130
|
+
Request: GET /v1/profiles/YWNtZS9leGFtcGxl
|
|
130
131
|
HTTP 404
|
|
131
132
|
```
|
|
132
133
|
|
|
134
|
+
A 404 also names the API request that returned it, without query; resource names
|
|
135
|
+
in the path are base64url-encoded. An API key works only in the workspace and
|
|
136
|
+
project it was issued for; selecting another one returns `API_KEY_SCOPE_MISMATCH`
|
|
137
|
+
(HTTP 403), whose message names both scopes.
|
|
138
|
+
|
|
133
139
|
## Explore your project
|
|
134
140
|
|
|
135
141
|
```bash
|
|
@@ -160,6 +166,31 @@ cleaning up temporary resources.
|
|
|
160
166
|
|
|
161
167
|
## Sandbox jobs
|
|
162
168
|
|
|
169
|
+
After `el auth login`, you may reuse an existing EnvPlatform Profile as an
|
|
170
|
+
optional preset. It uses the current login and project permissions. Submit its
|
|
171
|
+
published name and optional ANS input bindings or declared parameters:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
el job submit --type sandbox --profile team/report@1 --input report=ARTIFACT_URI --params Mode=Summary --max-cost-usd 3
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The platform resolves and freezes the Runner and inputs, and manages any model
|
|
178
|
+
service declared by the Profile. No local script, Dataset Task wrapper or Runner
|
|
179
|
+
argument is required. Use a published Artifact URI in place of `ARTIFACT_URI`.
|
|
180
|
+
|
|
181
|
+
A Dataset input selects its config and split with `--input-config NAME=CONFIG`
|
|
182
|
+
and `--input-split NAME=SPLIT`; when only one Dataset is bound, `--config` and
|
|
183
|
+
`--split` are shorthands. A Dataset URI alone uses the default config and the
|
|
184
|
+
train split:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
el job submit --type train --profile team/sft@3 \
|
|
188
|
+
--input train_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split train_dataset=train-1 \
|
|
189
|
+
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
190
|
+
```
|
|
191
|
+
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
192
|
+
retain their case and duplicates are rejected.
|
|
193
|
+
|
|
163
194
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
164
195
|
Sandbox Job without a Dataset:
|
|
165
196
|
|
|
@@ -171,7 +202,7 @@ el job log JOB_ID --follow
|
|
|
171
202
|
```
|
|
172
203
|
|
|
173
204
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
174
|
-
freezes its immutable Revision. The Sandbox image defaults to
|
|
205
|
+
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
175
206
|
`--image` accepts an image name, tag or digest. The execution provider is configured
|
|
176
207
|
by the server. Job logs retain the actual captured output and collection metadata.
|
|
177
208
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
@@ -250,7 +281,7 @@ CLI output uses compact timestamps and highlights statuses and log levels by def
|
|
|
250
281
|
Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
|
|
251
282
|
`NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
|
|
252
283
|
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`.
|
|
253
|
-
`el
|
|
284
|
+
`el loop live LOOP_ID --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Loop.
|
|
254
285
|
|
|
255
286
|
## Job-bound decision plugins
|
|
256
287
|
|
|
@@ -277,9 +308,9 @@ Availability requires matching platform support and approved content in your pro
|
|
|
277
308
|
|
|
278
309
|
## ANS data and verified downloads
|
|
279
310
|
|
|
280
|
-
`client.data.download_directory(uri, destination)` and `el data download URI --output ./content`
|
|
311
|
+
`client.data.download_directory(uri, destination)` and `el data download DATA_ID|URI --output ./content`
|
|
281
312
|
download a complete registered ANS object directory through EnvHub. Datasets require
|
|
282
|
-
`split="lite"` / `--split lite
|
|
313
|
+
`split="lite"` / `--split lite` (the error lists the declared splits); the Dataset version and filenames are preserved. After API
|
|
283
314
|
authorization the SDK uses GET URLs valid for up to five minutes, verifies file size/SHA-256,
|
|
284
315
|
and installs the directory atomically. Matching platform support is required.
|
|
285
316
|
|
|
@@ -291,9 +322,9 @@ el data get DATA_ID --json
|
|
|
291
322
|
el data download DATA_ID --file FILE_ID --output ./dataset.tgz --resume --json
|
|
292
323
|
```
|
|
293
324
|
|
|
294
|
-
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
|
|
325
|
+
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.
|
|
295
326
|
|
|
296
|
-
`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.
|
|
297
328
|
|
|
298
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.
|
|
299
330
|
|
|
@@ -110,9 +110,15 @@ disable color. `--json` stdout remains JSON.
|
|
|
110
110
|
```text
|
|
111
111
|
Error: PROFILE_NOT_FOUND
|
|
112
112
|
The Profile was not found or is not readable in the current scope.
|
|
113
|
+
Request: GET /v1/profiles/YWNtZS9leGFtcGxl
|
|
113
114
|
HTTP 404
|
|
114
115
|
```
|
|
115
116
|
|
|
117
|
+
A 404 also names the API request that returned it, without query; resource names
|
|
118
|
+
in the path are base64url-encoded. An API key works only in the workspace and
|
|
119
|
+
project it was issued for; selecting another one returns `API_KEY_SCOPE_MISMATCH`
|
|
120
|
+
(HTTP 403), whose message names both scopes.
|
|
121
|
+
|
|
116
122
|
## Explore your project
|
|
117
123
|
|
|
118
124
|
```bash
|
|
@@ -143,6 +149,31 @@ cleaning up temporary resources.
|
|
|
143
149
|
|
|
144
150
|
## Sandbox jobs
|
|
145
151
|
|
|
152
|
+
After `el auth login`, you may reuse an existing EnvPlatform Profile as an
|
|
153
|
+
optional preset. It uses the current login and project permissions. Submit its
|
|
154
|
+
published name and optional ANS input bindings or declared parameters:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
el job submit --type sandbox --profile team/report@1 --input report=ARTIFACT_URI --params Mode=Summary --max-cost-usd 3
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The platform resolves and freezes the Runner and inputs, and manages any model
|
|
161
|
+
service declared by the Profile. No local script, Dataset Task wrapper or Runner
|
|
162
|
+
argument is required. Use a published Artifact URI in place of `ARTIFACT_URI`.
|
|
163
|
+
|
|
164
|
+
A Dataset input selects its config and split with `--input-config NAME=CONFIG`
|
|
165
|
+
and `--input-split NAME=SPLIT`; when only one Dataset is bound, `--config` and
|
|
166
|
+
`--split` are shorthands. A Dataset URI alone uses the default config and the
|
|
167
|
+
train split:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
el job submit --type train --profile team/sft@3 \
|
|
171
|
+
--input train_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split train_dataset=train-1 \
|
|
172
|
+
--input eval_dataset=envloop://datasets/envloop/pev@1.0.4 --input-split eval_dataset=validation
|
|
173
|
+
```
|
|
174
|
+
`--profile` and `--spec` are mutually exclusive. Named Profile parameter names
|
|
175
|
+
retain their case and duplicates are rejected.
|
|
176
|
+
|
|
146
177
|
With a matching platform and a published `envloop/base` ANS Runner, submit a
|
|
147
178
|
Sandbox Job without a Dataset:
|
|
148
179
|
|
|
@@ -154,7 +185,7 @@ el job log JOB_ID --follow
|
|
|
154
185
|
```
|
|
155
186
|
|
|
156
187
|
The platform resolves `base` to the registered `envloop/base@main` source ref and
|
|
157
|
-
freezes its immutable Revision. The Sandbox image defaults to
|
|
188
|
+
freezes its immutable Revision. The Sandbox image defaults to the registered Runner image;
|
|
158
189
|
`--image` accepts an image name, tag or digest. The execution provider is configured
|
|
159
190
|
by the server. Job logs retain the actual captured output and collection metadata.
|
|
160
191
|
Failures include a code, readable explanation, HTTP status when available, and
|
|
@@ -233,7 +264,7 @@ CLI output uses compact timestamps and highlights statuses and log levels by def
|
|
|
233
264
|
Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
|
|
234
265
|
`NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
|
|
235
266
|
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`.
|
|
236
|
-
`el
|
|
267
|
+
`el loop live LOOP_ID --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Loop.
|
|
237
268
|
|
|
238
269
|
## Job-bound decision plugins
|
|
239
270
|
|
|
@@ -260,9 +291,9 @@ Availability requires matching platform support and approved content in your pro
|
|
|
260
291
|
|
|
261
292
|
## ANS data and verified downloads
|
|
262
293
|
|
|
263
|
-
`client.data.download_directory(uri, destination)` and `el data download URI --output ./content`
|
|
294
|
+
`client.data.download_directory(uri, destination)` and `el data download DATA_ID|URI --output ./content`
|
|
264
295
|
download a complete registered ANS object directory through EnvHub. Datasets require
|
|
265
|
-
`split="lite"` / `--split lite
|
|
296
|
+
`split="lite"` / `--split lite` (the error lists the declared splits); the Dataset version and filenames are preserved. After API
|
|
266
297
|
authorization the SDK uses GET URLs valid for up to five minutes, verifies file size/SHA-256,
|
|
267
298
|
and installs the directory atomically. Matching platform support is required.
|
|
268
299
|
|
|
@@ -274,9 +305,9 @@ el data get DATA_ID --json
|
|
|
274
305
|
el data download DATA_ID --file FILE_ID --output ./dataset.tgz --resume --json
|
|
275
306
|
```
|
|
276
307
|
|
|
277
|
-
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
|
|
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`; 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.
|
|
278
309
|
|
|
279
|
-
`el runner
|
|
310
|
+
`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.
|
|
280
311
|
|
|
281
312
|
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.
|
|
282
313
|
|
|
@@ -19,26 +19,29 @@ 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')},
|
|
38
41
|
**{name: ('experiment', 'client') for name in ('TrialService', 'RpcService', 'load_task', 'validate_command', 'dataset_selector', 'Trials', 'runner_selector', 'job_budget', 'Jobs')},
|
|
39
42
|
**{name: ('base', 'downloads') for name in ('ArtifactError', 'artifact_path')},
|
|
40
43
|
}
|
|
41
|
-
DATA_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 revoke_profile_secret export_profile import_profile open_checkpoint_archive'.split())
|
|
44
|
+
DATA_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())
|
|
42
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())
|
|
43
46
|
|
|
44
47
|
|
|
@@ -148,8 +151,8 @@ def client_resource(client: Any, name: str):
|
|
|
148
151
|
return feature_attribute('experiment', 'train', 'TrainJobs')(server)
|
|
149
152
|
if name == 'decision':
|
|
150
153
|
return feature_attribute('experiment', 'decision', 'DecisionClient')(server)
|
|
151
|
-
if name == '
|
|
152
|
-
return feature_attribute('rsi-loop', '
|
|
154
|
+
if name == 'loops':
|
|
155
|
+
return feature_attribute('rsi-loop', 'loops', 'Loops')(client.training_jobs)
|
|
153
156
|
if name in {'endpoints', 'adapters'}:
|
|
154
157
|
return feature_attribute('experiment', 'resources', name.capitalize())(server)
|
|
155
158
|
if name == 'inference':
|
|
@@ -160,6 +163,8 @@ def client_resource(client: Any, name: str):
|
|
|
160
163
|
def execute_command(args: argparse.Namespace, client: Any, cli: Any):
|
|
161
164
|
if args.group in {'job', 'trial'}:
|
|
162
165
|
return getattr(feature_module('experiment', 'cli'), 'execute_' + args.group)(args, client, cli)
|
|
166
|
+
if args.group == 'loop':
|
|
167
|
+
return feature_module('rsi-loop', 'loop_cli').execute(args, client)
|
|
163
168
|
if args.group == 'profile':
|
|
164
169
|
return feature_module('data', 'cli').execute_profile(args, client, cli)
|
|
165
170
|
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))
|