envloop-cli 1.4.0__tar.gz → 1.10.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.
Files changed (39) hide show
  1. envloop_cli-1.10.0/PKG-INFO +218 -0
  2. envloop_cli-1.10.0/README.pypi.md +205 -0
  3. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/agent_runs.py +7 -3
  4. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/auth_cli.py +1 -1
  5. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/cli.py +103 -34
  6. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/cli_errors.py +153 -100
  7. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/cli_output.py +15 -16
  8. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/client.py +15 -33
  9. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/http.py +78 -25
  10. envloop_cli-1.10.0/envloop/inference.py +35 -0
  11. envloop_cli-1.10.0/envloop/job_spec_cli.py +138 -0
  12. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/resources.py +0 -4
  13. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/rsi_cli.py +16 -5
  14. envloop_cli-1.10.0/envloop/terminal.py +77 -0
  15. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/train.py +26 -2
  16. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/train_log_cli.py +33 -29
  17. envloop_cli-1.10.0/envloop/train_runner_cli.py +64 -0
  18. envloop_cli-1.10.0/envloop/training/__init__.py +4 -0
  19. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/pyproject.toml +2 -5
  20. envloop_cli-1.4.0/PKG-INFO +0 -122
  21. envloop_cli-1.4.0/README.pypi.md +0 -109
  22. envloop_cli-1.4.0/envloop/training/__init__.py +0 -123
  23. envloop_cli-1.4.0/envloop/training/credentials.py +0 -107
  24. envloop_cli-1.4.0/envloop/training/sampling_client.py +0 -58
  25. envloop_cli-1.4.0/envloop/training/service_client.py +0 -165
  26. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/.gitignore +0 -0
  27. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/__init__.py +0 -0
  28. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/auth_login.py +0 -0
  29. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/auth_workspace.py +0 -0
  30. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/config.py +0 -0
  31. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/job_logs.py +0 -0
  32. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/lifecycle_cli.py +0 -0
  33. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/navigation_resources.py +0 -0
  34. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/profile_secrets.py +0 -0
  35. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/profile_updates.py +0 -0
  36. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/resource_cli.py +0 -0
  37. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/sandbox.py +0 -0
  38. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/utils/__init__.py +0 -0
  39. {envloop_cli-1.4.0 → envloop_cli-1.10.0}/envloop/utils/logging.py +0 -0
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.5
2
+ Name: envloop-cli
3
+ Version: 1.10.0
4
+ Summary: EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference
5
+ Project-URL: Homepage, https://envloop.ai
6
+ Project-URL: Documentation, https://docs.envloop.ai
7
+ Project-URL: Repository, https://github.com/EnvLoop/envloop-cli
8
+ Project-URL: Issues, https://github.com/EnvLoop/envloop-cli/issues
9
+ Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: tinker==0.34.0
12
+ Description-Content-Type: text/markdown
13
+
14
+ # envloop-cli: EnvLoop CLI and Python SDK
15
+
16
+ Install the public client to run agent Jobs, inspect Trials, manage training and
17
+ checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
18
+ commands are equivalent. The Python import package is `envloop`.
19
+
20
+ ## Version 1.7
21
+
22
+ - Use published Runner resource shortcuts for Train Jobs and fixed Checkpoint inputs for Inference Jobs.
23
+ - Pass `--json` explicitly to `job submit`; failures retain safe error codes and recovery guidance.
24
+ - Submit training through Train Jobs. The retired interactive `envloop.training` interface is removed.
25
+
26
+ After upgrading, check `el --version` and `el job submit --help`. Execution also
27
+ requires a matching platform, project permissions and published Runners; package
28
+ installation alone does not establish those prerequisites. See the
29
+ [PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
30
+
31
+ ## Install
32
+
33
+ Use a Python virtual environment:
34
+
35
+ ```bash
36
+ python -m pip install --upgrade envloop-cli
37
+ el --help
38
+ ```
39
+
40
+ The standard installation includes the client dependencies for managed training.
41
+ Check that the SDK can be imported:
42
+
43
+ ```bash
44
+ python -c 'from envloop import Client; print("EnvLoop SDK ready")'
45
+ ```
46
+
47
+ When you see `EnvLoop SDK ready`, continue to Connect. This check imports the
48
+ client without creating a Job. Submit training through `client.training_jobs`;
49
+ follow the [managed training guide](https://docs.envloop.ai/training/cli-hello-world).
50
+
51
+ Install the client in your Python environment; the platform provides the execution resources.
52
+
53
+ ## Connect
54
+
55
+ Use an authorized EnvLoop account and project. Browser authorization:
56
+
57
+ ```bash
58
+ el auth login
59
+ el auth status --check
60
+ ```
61
+
62
+ For an existing project API key, use the masked configuration wizard:
63
+
64
+ ```bash
65
+ el auth config
66
+ el auth status --check
67
+ ```
68
+
69
+ CI can read credentials from `ENVLOOP_API_KEY` and connection settings from
70
+ `ENVLOOP_BASE_URL`, `ENVLOOP_WORKSPACE_ID` and `ENVLOOP_PROJECT_ID`. Keep keys in
71
+ your secret manager. Public API access is scoped to the authorized project.
72
+
73
+ Credentials and settings live in `~/.envloop` (override with an absolute
74
+ `ENVLOOP_HOME`). On POSIX the directory must be private and owned by you. Use the
75
+ default path when the optional environment variable is unset:
76
+
77
+ ```bash
78
+ mkdir -p "${ENVLOOP_HOME:-$HOME/.envloop}"
79
+ chmod 700 "${ENVLOOP_HOME:-$HOME/.envloop}"
80
+ ```
81
+
82
+ An insecure directory causes `el` to fail with `CONFIG_INSECURE_PATH`.
83
+
84
+ ## Errors
85
+
86
+ Errors go to stderr as an error code, a short explanation and the applicable
87
+ HTTP status, without a Hint. Interactive terminals use a red heading and a dim
88
+ HTTP status. Redirected output, pipes, `TERM=dumb`, or a nonempty `NO_COLOR`
89
+ disable color. `--json` stdout remains JSON.
90
+
91
+ ```text
92
+ Error: PROFILE_NOT_FOUND
93
+ The Profile was not found or is not readable in the current scope.
94
+ HTTP 404
95
+ ```
96
+
97
+ ## Explore your project
98
+
99
+ ```bash
100
+ el job list --limit 5
101
+ el job list --type train --limit 5
102
+ el trail list --limit 5
103
+ el trail list --type train --job-id JOB_ID
104
+ el checkpoint list --limit 5
105
+ el job list --type inference
106
+ ```
107
+
108
+ Query a returned Job ID with `el job get JOB_ID` and `el job result JOB_ID`.
109
+ Trial commands use the spelling `trail`, for example
110
+ `el trail artifact list TRIAL_ID`. Use each command's `--help` for options.
111
+
112
+ For the Python SDK:
113
+
114
+ ```python
115
+ from envloop import Client
116
+
117
+ with Client.remote() as client:
118
+ print(client.jobs.list(limit=5))
119
+ print(client.trials.list(type="train", limit=5))
120
+ ```
121
+
122
+ Submitting work, training a model or starting inference can allocate billable
123
+ resources. Follow the task-specific guide and retain the outputs you need before
124
+ cleaning up temporary resources.
125
+
126
+ ## Sandbox jobs
127
+
128
+ With a matching platform and a published `envhub/base` ANS Runner, submit a
129
+ Sandbox Job without a Dataset:
130
+
131
+ ```bash
132
+ el job submit --type sandbox --runner base --command 'python --version'
133
+ el job submit --type sandbox --runner base --image python:3.11 --wait
134
+ el job list --type sandbox
135
+ el job log JOB_ID --follow
136
+ ```
137
+
138
+ The platform resolves `base` to the registered `envhub/base@main` source ref and
139
+ freezes its immutable Revision. The Sandbox image defaults to `python:3.11`;
140
+ `--image` accepts an image name, tag or digest. The execution provider is configured
141
+ by the server. Job logs retain the actual captured output and collection metadata.
142
+ Failures include a code, readable explanation, HTTP status when available, and
143
+ recovery guidance without echoing arbitrary response bodies or credentials.
144
+
145
+ ## Existing installations
146
+
147
+ This distribution provides both the CLI and the `envloop` import package. Use a
148
+ fresh environment if you previously installed the separate source distribution
149
+ named `envloop`, so two distributions do not own the same Python module files.
150
+ Existing client configuration is reused; installing a package does not change
151
+ your account permissions or move remote resources. Check `el --help` when
152
+ upgrading because command groups may differ from your earlier installation.
153
+
154
+ ## Documentation
155
+
156
+ - [English documentation](https://docs.envloop.ai/)
157
+ - [中文文档](https://docs.envloop.ai/zh-cn/)
158
+ - [Installation](https://docs.envloop.ai/cli-install)
159
+ - [CLI reference](https://docs.envloop.ai/reference/cli)
160
+ - [Training and deployment](https://docs.envloop.ai/training/train-deploy)
161
+ - [Agent entry: skill.md](https://docs.envloop.ai/skill.md)
162
+
163
+ ## Submit managed training
164
+
165
+ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://docs.envloop.ai/training/quickstart).
166
+ Training uses billable resources. Check your project permissions, balance and data format, then submit once:
167
+
168
+ ```bash
169
+ el job submit --type train --spec REQUEST.json
170
+ el job get JOB_ID
171
+ el job log JOB_ID --follow
172
+ el job result JOB_ID
173
+ el checkpoint list --job-id JOB_ID
174
+ ```
175
+
176
+ `job submit --spec` reads the complete Job specification JSON file for Train or Inference.
177
+ The former `job submit --file` option is removed; the JSON payload is unchanged.
178
+
179
+ Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
180
+ Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
181
+ See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
182
+
183
+ The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
184
+ For an older interactive training script, follow the [managed training migration](https://docs.envloop.ai/training/sdk-compatibility).
185
+
186
+ ## Run a GPU Runner
187
+
188
+ Choose a published Runner readable in your project. Save this request as `gpu-run.json`, replacing `FULL_COMMIT` with the full Revision from `el runner list --json`:
189
+
190
+ ```json
191
+ {
192
+ "request_id": "gpu-run-001",
193
+ "trials": [
194
+ {"name": "first", "spec": {"runner": "envhub/bash-runner@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}},
195
+ {"name": "second", "spec": {"runner": "envhub/bash-runner@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}}
196
+ ]
197
+ }
198
+ ```
199
+
200
+ ```bash
201
+ el job submit --type train --spec gpu-run.json
202
+ el job get JOB_ID
203
+ el job log JOB_ID --follow
204
+ el job result JOB_ID
205
+ ```
206
+
207
+ Replace `JOB_ID` with the returned value. The example has two independent Trials, each requesting four H100 GPUs: concurrent execution needs eight GPUs. Capacity and budget determine actual concurrency. Startup and execution are billable; check the Runner requirements, project `training.run` permission and [training prices](https://docs.envloop.ai/pricing) first. Reduce the Trial or GPU count when your program supports a smaller first run.
208
+
209
+ The request file does not depend on GPU shortcut flags. If `el job submit --help` lists both `--trails` and `--gput-type`, you can instead use the shortcuts in [GPU Runner training](https://docs.envloop.ai/training/runner). Choose one submission method to avoid duplicate runs. The SDK accepts the same dictionary through `client.training_jobs.submit(request)`.
210
+
211
+ The platform starts the published Revision’s `main.sh` / `main.py` using the Runner image; it does not upload local code. An optional command can only supply a declared `run_command` parameter. If this mode or GPU type is unavailable, contact your project administrator. Use `el job stop JOB_ID` to stop every Trial, then inspect each Trial’s `cleanup_confirmed` and download the uploaded artifacts you need.
212
+
213
+
214
+ CLI output uses compact timestamps and highlights statuses and log levels by default on terminals.
215
+ Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
216
+ `NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
217
+ List times use the local timezone; Job logs retain the recorded timezone, with full precision and offsets available through `--json`.
218
+ `el job run live RUN --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Run.
@@ -0,0 +1,205 @@
1
+ # envloop-cli: EnvLoop CLI and Python SDK
2
+
3
+ Install the public client to run agent Jobs, inspect Trials, manage training and
4
+ checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
5
+ commands are equivalent. The Python import package is `envloop`.
6
+
7
+ ## Version 1.7
8
+
9
+ - Use published Runner resource shortcuts for Train Jobs and fixed Checkpoint inputs for Inference Jobs.
10
+ - Pass `--json` explicitly to `job submit`; failures retain safe error codes and recovery guidance.
11
+ - Submit training through Train Jobs. The retired interactive `envloop.training` interface is removed.
12
+
13
+ After upgrading, check `el --version` and `el job submit --help`. Execution also
14
+ requires a matching platform, project permissions and published Runners; package
15
+ installation alone does not establish those prerequisites. See the
16
+ [PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
17
+
18
+ ## Install
19
+
20
+ Use a Python virtual environment:
21
+
22
+ ```bash
23
+ python -m pip install --upgrade envloop-cli
24
+ el --help
25
+ ```
26
+
27
+ The standard installation includes the client dependencies for managed training.
28
+ Check that the SDK can be imported:
29
+
30
+ ```bash
31
+ python -c 'from envloop import Client; print("EnvLoop SDK ready")'
32
+ ```
33
+
34
+ When you see `EnvLoop SDK ready`, continue to Connect. This check imports the
35
+ client without creating a Job. Submit training through `client.training_jobs`;
36
+ follow the [managed training guide](https://docs.envloop.ai/training/cli-hello-world).
37
+
38
+ Install the client in your Python environment; the platform provides the execution resources.
39
+
40
+ ## Connect
41
+
42
+ Use an authorized EnvLoop account and project. Browser authorization:
43
+
44
+ ```bash
45
+ el auth login
46
+ el auth status --check
47
+ ```
48
+
49
+ For an existing project API key, use the masked configuration wizard:
50
+
51
+ ```bash
52
+ el auth config
53
+ el auth status --check
54
+ ```
55
+
56
+ CI can read credentials from `ENVLOOP_API_KEY` and connection settings from
57
+ `ENVLOOP_BASE_URL`, `ENVLOOP_WORKSPACE_ID` and `ENVLOOP_PROJECT_ID`. Keep keys in
58
+ your secret manager. Public API access is scoped to the authorized project.
59
+
60
+ Credentials and settings live in `~/.envloop` (override with an absolute
61
+ `ENVLOOP_HOME`). On POSIX the directory must be private and owned by you. Use the
62
+ default path when the optional environment variable is unset:
63
+
64
+ ```bash
65
+ mkdir -p "${ENVLOOP_HOME:-$HOME/.envloop}"
66
+ chmod 700 "${ENVLOOP_HOME:-$HOME/.envloop}"
67
+ ```
68
+
69
+ An insecure directory causes `el` to fail with `CONFIG_INSECURE_PATH`.
70
+
71
+ ## Errors
72
+
73
+ Errors go to stderr as an error code, a short explanation and the applicable
74
+ HTTP status, without a Hint. Interactive terminals use a red heading and a dim
75
+ HTTP status. Redirected output, pipes, `TERM=dumb`, or a nonempty `NO_COLOR`
76
+ disable color. `--json` stdout remains JSON.
77
+
78
+ ```text
79
+ Error: PROFILE_NOT_FOUND
80
+ The Profile was not found or is not readable in the current scope.
81
+ HTTP 404
82
+ ```
83
+
84
+ ## Explore your project
85
+
86
+ ```bash
87
+ el job list --limit 5
88
+ el job list --type train --limit 5
89
+ el trail list --limit 5
90
+ el trail list --type train --job-id JOB_ID
91
+ el checkpoint list --limit 5
92
+ el job list --type inference
93
+ ```
94
+
95
+ Query a returned Job ID with `el job get JOB_ID` and `el job result JOB_ID`.
96
+ Trial commands use the spelling `trail`, for example
97
+ `el trail artifact list TRIAL_ID`. Use each command's `--help` for options.
98
+
99
+ For the Python SDK:
100
+
101
+ ```python
102
+ from envloop import Client
103
+
104
+ with Client.remote() as client:
105
+ print(client.jobs.list(limit=5))
106
+ print(client.trials.list(type="train", limit=5))
107
+ ```
108
+
109
+ Submitting work, training a model or starting inference can allocate billable
110
+ resources. Follow the task-specific guide and retain the outputs you need before
111
+ cleaning up temporary resources.
112
+
113
+ ## Sandbox jobs
114
+
115
+ With a matching platform and a published `envhub/base` ANS Runner, submit a
116
+ Sandbox Job without a Dataset:
117
+
118
+ ```bash
119
+ el job submit --type sandbox --runner base --command 'python --version'
120
+ el job submit --type sandbox --runner base --image python:3.11 --wait
121
+ el job list --type sandbox
122
+ el job log JOB_ID --follow
123
+ ```
124
+
125
+ The platform resolves `base` to the registered `envhub/base@main` source ref and
126
+ freezes its immutable Revision. The Sandbox image defaults to `python:3.11`;
127
+ `--image` accepts an image name, tag or digest. The execution provider is configured
128
+ by the server. Job logs retain the actual captured output and collection metadata.
129
+ Failures include a code, readable explanation, HTTP status when available, and
130
+ recovery guidance without echoing arbitrary response bodies or credentials.
131
+
132
+ ## Existing installations
133
+
134
+ This distribution provides both the CLI and the `envloop` import package. Use a
135
+ fresh environment if you previously installed the separate source distribution
136
+ named `envloop`, so two distributions do not own the same Python module files.
137
+ Existing client configuration is reused; installing a package does not change
138
+ your account permissions or move remote resources. Check `el --help` when
139
+ upgrading because command groups may differ from your earlier installation.
140
+
141
+ ## Documentation
142
+
143
+ - [English documentation](https://docs.envloop.ai/)
144
+ - [中文文档](https://docs.envloop.ai/zh-cn/)
145
+ - [Installation](https://docs.envloop.ai/cli-install)
146
+ - [CLI reference](https://docs.envloop.ai/reference/cli)
147
+ - [Training and deployment](https://docs.envloop.ai/training/train-deploy)
148
+ - [Agent entry: skill.md](https://docs.envloop.ai/skill.md)
149
+
150
+ ## Submit managed training
151
+
152
+ Prepare a recipe-supported `REQUEST.json` using the [SFT quickstart](https://docs.envloop.ai/training/quickstart).
153
+ Training uses billable resources. Check your project permissions, balance and data format, then submit once:
154
+
155
+ ```bash
156
+ el job submit --type train --spec REQUEST.json
157
+ el job get JOB_ID
158
+ el job log JOB_ID --follow
159
+ el job result JOB_ID
160
+ el checkpoint list --job-id JOB_ID
161
+ ```
162
+
163
+ `job submit --spec` reads the complete Job specification JSON file for Train or Inference.
164
+ The former `job submit --file` option is removed; the JSON payload is unchanged.
165
+
166
+ Replace `JOB_ID` with the receipt's value. Read the training status and logs, then find the registered checkpoint after success.
167
+ Ctrl-C ends log reading; to stop training, use `el job stop JOB_ID` and check its state and resource cleanup.
168
+ See [Checkpoints](https://docs.envloop.ai/training/checkpoints) to download or delete saved weights.
169
+
170
+ The built-in SFT recipe does not support custom loss, RL or optimizer-state resume.
171
+ For an older interactive training script, follow the [managed training migration](https://docs.envloop.ai/training/sdk-compatibility).
172
+
173
+ ## Run a GPU Runner
174
+
175
+ Choose a published Runner readable in your project. Save this request as `gpu-run.json`, replacing `FULL_COMMIT` with the full Revision from `el runner list --json`:
176
+
177
+ ```json
178
+ {
179
+ "request_id": "gpu-run-001",
180
+ "trials": [
181
+ {"name": "first", "spec": {"runner": "envhub/bash-runner@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}},
182
+ {"name": "second", "spec": {"runner": "envhub/bash-runner@FULL_COMMIT", "resources": {"gpu_type": "H100", "gpus": 4}, "timeout_sec": 600}}
183
+ ]
184
+ }
185
+ ```
186
+
187
+ ```bash
188
+ el job submit --type train --spec gpu-run.json
189
+ el job get JOB_ID
190
+ el job log JOB_ID --follow
191
+ el job result JOB_ID
192
+ ```
193
+
194
+ Replace `JOB_ID` with the returned value. The example has two independent Trials, each requesting four H100 GPUs: concurrent execution needs eight GPUs. Capacity and budget determine actual concurrency. Startup and execution are billable; check the Runner requirements, project `training.run` permission and [training prices](https://docs.envloop.ai/pricing) first. Reduce the Trial or GPU count when your program supports a smaller first run.
195
+
196
+ The request file does not depend on GPU shortcut flags. If `el job submit --help` lists both `--trails` and `--gput-type`, you can instead use the shortcuts in [GPU Runner training](https://docs.envloop.ai/training/runner). Choose one submission method to avoid duplicate runs. The SDK accepts the same dictionary through `client.training_jobs.submit(request)`.
197
+
198
+ The platform starts the published Revision’s `main.sh` / `main.py` using the Runner image; it does not upload local code. An optional command can only supply a declared `run_command` parameter. If this mode or GPU type is unavailable, contact your project administrator. Use `el job stop JOB_ID` to stop every Trial, then inspect each Trial’s `cleanup_confirmed` and download the uploaded artifacts you need.
199
+
200
+
201
+ CLI output uses compact timestamps and highlights statuses and log levels by default on terminals.
202
+ Use `el --no-color job list` or append `--no-color` to a command to disable highlighting, including errors.
203
+ `NO_COLOR=1`, `TERM=dumb`, pipes, and redirected output also disable colors. JSON preserves original values.
204
+ List times use the local timezone; Job logs retain the recorded timezone, with full precision and offsets available through `--json`.
205
+ `el job run live RUN --follow --json` emits complete response frames as NDJSON; Ctrl-C stops reading without stopping the Run.
@@ -1,7 +1,7 @@
1
1
  """Agent runs: a read-only view of Train Jobs grouped by their agent's run label.
2
2
 
3
3
  The platform stores no run object. Agents tag every Train Job they create with
4
- ``user_metadata`` (the RSI loop: ``rsi_run``, ``rsi_round``, ``rsi_checkpoint``...);
4
+ ``tags`` (the RSI loop: ``rsi_run``, ``rsi_round``, ``rsi_checkpoint``...);
5
5
  this module pages through ``GET /v1/job`` and derives runs from those tags,
6
6
  using the same rules as the Console's agent runs page.
7
7
  """
@@ -34,7 +34,11 @@ class AgentRunError(RuntimeError):
34
34
 
35
35
 
36
36
  def _metadata(job) -> dict:
37
- metadata = job.get("user_metadata")
37
+ metadata = job.get("tags")
38
+ if not isinstance(metadata, dict):
39
+ metadata = job.get("labels")
40
+ if not isinstance(metadata, dict):
41
+ metadata = job.get("user_metadata")
38
42
  return metadata if isinstance(metadata, dict) else {}
39
43
 
40
44
 
@@ -111,7 +115,7 @@ def _job_view(job) -> dict:
111
115
  "lora_rank": job.get("lora_rank"),
112
116
  "model_id": job.get("model_id"),
113
117
  "checkpoint": _checkpoint(job),
114
- "user_metadata": metadata,
118
+ "tags": metadata,
115
119
  }
116
120
 
117
121
 
@@ -282,7 +282,7 @@ def run_auth(args, parser):
282
282
  report["check"] = {401: "authentication_rejected", 403: "authorization_denied"}.get(
283
283
  getattr(error, "status_code", None), safe_error_code(error))
284
284
  _print(report, args.json)
285
- print(format_error(error, args=args, program=parser.prog), file=sys.stderr)
285
+ print(format_error(error), file=sys.stderr)
286
286
  return 1
287
287
  _print(report, getattr(args, "json", False))
288
288
  return 0