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
Copy file name to clipboardExpand all lines: .agents/skills/transformerlab-cli/SKILL.md
+46-1Lines changed: 46 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,40 @@ lab --format json task info 42
86
86
lab job list --format json
87
87
```
88
88
89
+
## Profiles: talking to multiple servers in parallel
90
+
91
+
A **profile** bundles one server's URL, team, experiment, and API key. The `default` profile lives at the legacy location (`~/.lab/config.json`, `~/.lab/credentials`); named profiles live under `~/.lab/profiles/<name>/`. This lets two `lab` commands hit two different servers (with different teams / API keys) **at the same time** without clobbering each other.
92
+
93
+
Selection is **per-process** — there is no stored "current profile" to switch (so nothing one process can yank out from under another). Precedence (highest first):
94
+
95
+
1.`--profile <name>` — a root-level flag; like `--format` it MUST come before the subcommand: `lab --profile prod job list`
96
+
2.`LAB_PROFILE` environment variable
97
+
3.`default`
98
+
99
+
```bash
100
+
# Create/authenticate a profile. `login` is the profile-creating command;
101
+
# combine the global --profile flag with --server:
# Run against two servers in parallel — fully isolated, safe:
106
+
LAB_PROFILE=prod lab job list &
107
+
LAB_PROFILE=staging lab job list &
108
+
109
+
# One-off override without exporting the env var:
110
+
lab --profile prod job list
111
+
```
112
+
113
+
Manage profiles:
114
+
115
+
```bash
116
+
lab profile list # all profiles; marks the active one + which have saved credentials
117
+
lab profile show [name] # server/team/user/experiment for a profile (defaults to the active one)
118
+
lab profile delete <name># remove a named profile ('default' cannot be deleted)
119
+
```
120
+
121
+
**For agents:** to run workstreams against different *servers* concurrently, give each its own profile and set `LAB_PROFILE` per process (or pass `--profile` on every call). This is the server/team/credentials analogue of the per-command `-e/--experiment` override — profiles scope which server+team+key you talk to, `-e` scopes which experiment *within* that server (see "Scoping a single command to an experiment"). Profiles do **not** scope the experiment; keep using `-e` for that.
122
+
89
123
## Core Workflow
90
124
91
125
The standard pattern for working with Transformer Lab:
-**Pass `-e <exp>` on every `task` / `job` / `notes` command** for that workstream. Treat it as mandatory, not optional — a single omitted `-e` leaks into the global default.
310
344
-**Never call `lab experiment set-default` (or `lab config set current_experiment`) mid-flight** while other experiments are in flight — it yanks the default out from under any command that forgot its `-e`.
311
-
- There is **no environment variable** (e.g. `LAB_EXPERIMENT`) and **no per-session config file** to scope this once for a whole session — the override is strictly per-command. Plan for passing `-e` on each call.
345
+
- There is **no environment variable** (e.g. `LAB_EXPERIMENT`) and **no per-session config file** to scope the *experiment*once for a whole session — the `-e`override is strictly per-command. Plan for passing `-e` on each call. (The *server/team/credentials* dimension is different: that **can** be scoped per-process via a profile + `LAB_PROFILE` — see "Profiles: talking to multiple servers in parallel". A profile does not pin the experiment, so even within a profile you still pass `-e` per command.)
312
346
313
347
For a single, sequential workflow it's fine to set the default once with `set-default` and omit `-e`. The `-e` discipline only becomes load-bearing when more than one experiment is active concurrently.
314
348
@@ -596,6 +630,13 @@ lab --format json provider info PROVIDER_ID
596
630
# Health check (verifies the CLI can reach the provider's backend)
597
631
lab --format json provider check PROVIDER_ID
598
632
633
+
# Show the GPUs available on a provider (accepts an id OR a name, like `delete`).
634
+
# Reports live availability where the backend can report it (Slurm, SkyPilot,
635
+
# RunPod, Lambda, Vast, Local), otherwise the provider's catalog of launchable
636
+
# GPU types (AWS, GCP, Azure, Nebius). Each row is a GPU name + count; an empty
637
+
# result ("No GPU information available") is normal for dstack and CPU-only hosts.
@@ -952,6 +993,9 @@ This applies to launching jobs, fetching logs, checking cluster status, and ever
952
993
|`lab logout`| Remove stored API key | No |
953
994
|`lab whoami`| Show current user and team | No |
954
995
|`lab version`| Show CLI version | No |
996
+
|`lab profile list`| List CLI profiles (server+team+credentials sets); marks the active one and which have credentials | No |
997
+
|`lab profile show [name]`| Show a profile's server/team/user/experiment (defaults to the active profile) | No |
998
+
|`lab profile delete <name>`| Delete a named profile (`'default'` cannot be deleted; `--yes` to skip prompt) | No |
955
999
|`lab experiment list`| List all experiments (current default marked with `*`) | No |
956
1000
|`lab experiment create <name>`| Create a new experiment (`--set-default` to also switch to it) | No |
957
1001
|`lab experiment delete <id>`| Delete an experiment (`--no-interactive` to skip prompt) | No |
@@ -990,6 +1034,7 @@ This applies to launching jobs, fetching logs, checking cluster status, and ever
990
1034
|`lab provider update <id>`| Update provider config | No |
991
1035
|`lab provider delete <id>`| Delete a provider (`--no-interactive` to skip prompt) | No |
992
1036
|`lab provider check <id>`| Check provider health | No |
1037
+
|`lab provider gpus <id_or_name>`| Show available GPUs on a provider (live where supported, else catalog) | No |
993
1038
|`lab provider verify-lifecycle <id>`| Verify provider lifecycle via a storage probe (`--no-wait` to launch only; see `--help` for polling options) | No |
994
1039
|`lab provider enable <id>`| Enable a provider | No |
995
1040
|`lab provider disable <id>`| Disable a provider | No |
Copy file name to clipboardExpand all lines: .agents/skills/transformerlab-cli/references/commands.md
+58-3Lines changed: 58 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,14 @@ Full reference for every CLI command. All commands are invoked via:
6
6
lab <command> [subcommand] [options]
7
7
```
8
8
9
-
Global option available on all commands:
10
-
-`--format pretty|json` — Output format (default: `pretty`). **Must come before the subcommand.**
9
+
Global options available on all commands (**must come before the subcommand**):
10
+
-`--format pretty|json` — Output format (default: `pretty`).
11
+
-`--profile <name>` — Select the profile (server + team + credentials) for this invocation. Overrides the `LAB_PROFILE` env var; defaults to `default`. See [`profile`](#profile) below.
11
12
12
13
```bash
13
14
# Correct
14
15
lab --format json task list
16
+
lab --profile prod job list
15
17
16
18
# Wrong — flag will be ignored
17
19
lab task list --format json
@@ -61,9 +63,15 @@ Authenticate with the server. Also configures `server`, `user_email`, `team_id`,
61
63
|`--api-key <key>`| API key (prompted if omitted) |
62
64
|`--server <url>`| Server URL (prompted if omitted) |
63
65
66
+
To log into a **named profile**, combine the global `--profile` flag with `--server` — the credentials and config are written under that profile instead of `default`:
Manage CLI **profiles** — independent `(server + team + experiment + API key)` sets, so two `lab` commands can talk to two different servers in parallel. The `default` profile lives at the legacy root (`~/.lab/config.json`, `~/.lab/credentials`); named profiles live under `~/.lab/profiles/<name>/`.
88
+
89
+
Selection is **per-process** (there is no `use` subcommand / stored "current profile"). Precedence: `--profile <name>` (root-level flag, before the subcommand) > `LAB_PROFILE` env var > `default`.
90
+
91
+
```bash
92
+
lab profile list # list all profiles; marks active + which have credentials
93
+
lab profile show [name] # show a profile's config (defaults to the active profile)
94
+
lab profile delete <name> --yes # delete a named profile ('default' cannot be deleted)
95
+
96
+
# Create/authenticate a profile via login (see `login` above):
|`list`| List all profiles. JSON: array of `{name, active, has_credentials}`. |
107
+
|`show [name]`| Show `name`/`server`/`team_id`/`team_name`/`user_email`/`current_experiment`/`has_credentials` for a profile (defaults to the active one). |
108
+
|`delete <name>`| Delete a named profile directory. Refuses `default`. `--yes`/`-y` skips the confirm prompt. |
109
+
77
110
---
78
111
79
112
## Experiment Commands
@@ -498,6 +531,28 @@ Delete a compute provider.
498
531
499
532
Check connectivity and health of a provider.
500
533
534
+
### `provider gpus <provider_id_or_name>`
535
+
536
+
Show the GPUs available on a provider. The argument accepts either a provider id
537
+
or a name (resolved the same way as `provider delete`). Output is a `GPU | Count`
538
+
table, or `--format json` returns `{provider_id, provider_type, gpus: [{gpu, count}]}`.
539
+
540
+
Semantics: **live availability where the backend can report it** — Slurm (free
541
+
GPUs per node), SkyPilot (catalog across enabled clouds), RunPod, Lambda
542
+
(regions with capacity), Vast.ai (rentable offers), Local (detected GPUs) —
543
+
otherwise the provider's **catalog of launchable GPU types** (AWS, GCP, Azure,
544
+
Nebius, and the fallback for the live providers). `count` is the available
545
+
quantity for live sources, or the max launchable count per node for catalog
546
+
sources; there is no live-vs-catalog flag in the output. An empty list
547
+
(`No GPU information available`) is expected for dstack (no enumeration endpoint)
548
+
and CPU-only local hosts. The command never errors on backend failures — it
Copy file name to clipboardExpand all lines: .agents/skills/transformerlab-cli/references/troubleshooting.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,8 @@ lab config set server http://correct-host:8338
53
53
lab status
54
54
```
55
55
56
+
If you regularly switch between servers, `lab config set server` (which mutates the shared `default` profile) is the wrong tool — use **profiles** instead so each server keeps its own URL + team + key, and select per command with `--profile <name>` / `LAB_PROFILE`. See "Profiles: talking to multiple servers in parallel" in `SKILL.md`.
0 commit comments