You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Use `lab experiment list` to see existing experiments.
42
+
# If yours doesn't exist yet, run `lab experiment create your_experiment_name` first.
43
+
# `lab experiment set-default <id>` is a convenience equivalent to this command.
41
44
lab config set current_experiment your_experiment_name
42
45
43
46
# Step 4: Verify connectivity
@@ -242,6 +245,54 @@ lab.finish(message="Hello world complete!")
242
245
lab task add ./hello-world-task --no-interactive
243
246
```
244
247
248
+
## Managing Experiments
249
+
250
+
Use `lab experiment` commands to list, create, delete, and set the default experiment. **Experiments are the container for tasks and jobs** — most `lab task` / `lab job` commands operate against the *current* experiment (the one stored in `~/.lab/config.json` as `current_experiment`).
251
+
252
+
```bash
253
+
# List all experiments. The current default is marked with `*`.
254
+
lab experiment list
255
+
lab --format json experiment list
256
+
257
+
# Create a new experiment
258
+
lab experiment create my-experiment
259
+
260
+
# Create and immediately set as the default
261
+
lab experiment create my-experiment --set-default
262
+
263
+
# Delete an experiment (`--no-interactive` to skip confirmation)
# Switch which experiment is the default. This writes to ~/.lab/config.json.
267
+
lab experiment set-default my-experiment
268
+
```
269
+
270
+
### `lab experiment set-default` vs `lab config set current_experiment`
271
+
272
+
Both write the same key (`current_experiment`) to `~/.lab/config.json`. Differences:
273
+
274
+
-`lab experiment set-default <id>` validates that the experiment exists on the server before writing. Prefer this when scripting — it fails fast on a typo.
275
+
-`lab config set current_experiment <id>` is a raw config write and does not validate. Useful when bootstrapping a config (e.g. before the server is reachable) or when you've already confirmed the experiment exists.
276
+
277
+
### Finding an experiment ID by name
278
+
279
+
`lab experiment list` (and the JSON form) is the only sanctioned way to discover experiment IDs. **Do not fall back to `curl /experiment/`** — even when you only have a name and need the ID, this CLI surface covers it:
Use `lab model` commands to list, inspect, create, edit, and delete model groups on the server. Models are organized as **groups** — each group can contain multiple versions (e.g. v1, v2, …).
Don't restate the task name, full hyperparameter dict, or file paths — those are already on the job record. Don't copy the user's last message verbatim — synthesize. If the conversation is truly empty of signal, fall back to `"Rerun of <id>, no changes"`.
495
546
547
+
### Overriding task parameters per queue: `--param key=value`
548
+
549
+
`lab task queue` accepts repeatable `--param key=value` (alias `-p`) to override values from the task's `parameters:` block for a single job, without mutating `task.yaml`. Values are parsed as YAML scalars: `score=0.42` is a float, `enabled=true` is a bool, `tag=baseline` is a string. Unknown keys (not declared in the task's `parameters:`) fail hard so typos are caught at queue time.
550
+
551
+
```bash
552
+
# Sweep the same task with different hyperparameters
Use this instead of `lab task edit --from-file` between queue calls — editing the task affects already-queued-but-not-yet-dispatched jobs and is racy.
565
+
496
566
### Selecting a provider when queuing a task
497
567
498
568
`lab task queue` has no `--provider` flag. With `--no-interactive` it picks the default (usually Local). To pick a specific provider, drive the interactive prompts via stdin. The flow is:
@@ -571,14 +641,18 @@ This applies to launching jobs, fetching logs, checking cluster status, and ever
571
641
|`lab logout`| Remove stored API key | No |
572
642
|`lab whoami`| Show current user and team | No |
573
643
|`lab version`| Show CLI version | No |
644
+
|`lab experiment list`| List all experiments (current default marked with `*`) | No |
645
+
|`lab experiment create <name>`| Create a new experiment (`--set-default` to also switch to it) | No |
646
+
|`lab experiment delete <id>`| Delete an experiment (`--no-interactive` to skip prompt) | No |
647
+
|`lab experiment set-default <id>`| Set the default experiment (validates server-side, then writes `current_experiment` to `~/.lab/config.json`) | No |
574
648
|`lab task list`| List tasks in current experiment | Yes |
575
649
|`lab task info <id>`| Get task details | Yes |
576
650
|`lab task init`| Scaffold `task.yaml` + `main.py` in the current directory (`--interactive` to prompt) | No |
577
651
|`lab task add [dir]`| Add task from directory or `--from-git` URL (`--no-interactive`, `--dry-run`) | Yes |
|`lab task upload <id> <path>`| Upload files/directories into an existing task (`--no-interactive`) | Yes |
580
654
|`lab task delete <id>`| Delete a task (`--no-interactive` to skip confirmation) | Yes |
581
-
| `lab task queue <id>` | Queue task on compute provider (`-m/--description` for a markdown run note; required for agents, see "Always write a run description") | Yes |
655
+
|`lab task queue <id>`| Queue task on compute provider (`-m/--description` for a markdown run note; `-p/--param key=value` to override task parameters per run; required for agents, see "Always write a run description") | Yes |
582
656
|`lab task gallery`| Browse/import from task gallery | Yes |
583
657
|`lab job list`| List jobs (`--running` for active only) | Yes |
584
658
|`lab job info <id>`| Get detailed job information | Yes |
@@ -641,7 +715,7 @@ With non-zero exit code.
641
715
- Commands exit with non-zero status on failure
642
716
- With `--format json`, errors return `{"error": "<message>"}`
643
717
- "config not set" errors → run `lab login` first
644
-
- "current_experiment not set"→ run `lab config set current_experiment <id>`
718
+
- "current_experiment not set" → run `lab experiment list` to find an existing experiment, then `lab experiment set-default <id>` (or `lab experiment create <name> --set-default` if none exists)
645
719
- Connection refused → check server URL with `lab config`, verify server is running
646
720
- "No compute providers available" → add a provider in team settings first, or check `provider list`
-**X-Team-Id**: Required on all protected endpoints. Get it from `GET /users/me/teams`.
159
159
-**Unprotected endpoints**: `auth`, `api_keys`, `quota`, `compute_provider`, and the OpenAI-compatible API.
160
160
161
+
## package.json overrides
162
+
163
+
The `overrides` block in `package.json` forces secure transitive versions to clear known vulnerabilities. Revisit when:
164
+
165
+
- Bumping `eslint-config-erb` / `@typescript-eslint/*` (parent of `minimatch`)
166
+
- Bumping `webpack` / `terser-webpack-plugin` (parent of `serialize-javascript`)
167
+
- Bumping `webpack` / `css-loader` / `postcss-loader` (parents of `postcss`)
168
+
169
+
When upgrading those, try removing the override first and re-run a dependency vulnerability scan. If the parent now pulls a safe version on its own, drop the override entry and update this file if necessary.
170
+
161
171
## Agentic Performance Optimization
162
172
163
173
-**Context**: When making changes, look at similar existing files (e.g., "Implement the new `ModelService` following the pattern in `api/transformerlab/services/job_service.py`").
0 commit comments