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
`lab task edit`expects a `TASK_ID` and supports `--from-file`, `--no-interactive`, and `--timeout`.
180
+
**Choosing between `--from-file` and `--from-dir`:**
181
+
- `--from-file <task.yaml>`only updates the YAML. Use it when you're tweaking parameters or the `run` command and the rest of the task directory is unchanged.
182
+
- `--from-dir <directory>`zips and uploads the whole directory (must contain `task.yaml`), replacing the task's files server-side. Use it when you've also modified `main.py` or any sibling files. **If the task's `run` references a script (e.g. `python main.py`), reuploading just the YAML will leave the old script in place — use `--from-dir` to keep them in sync.**
183
+
184
+
`--from-file`and `--from-dir` are mutually exclusive. `lab task edit` also supports `--no-interactive`, `--dry-run` (with `--from-dir`), and `--timeout`.
178
185
179
186
### Uploading extra files to an existing task
180
187
@@ -690,7 +697,7 @@ This applies to launching jobs, fetching logs, checking cluster status, and ever
690
697
|`lab task info <id>`| Get task details | Yes |
691
698
|`lab task init`| Scaffold `task.yaml` + `main.py` in the current directory (`--interactive` to prompt) | No |
692
699
|`lab task add [dir]`| Add task from directory or `--from-git` URL (`--no-interactive`, `--dry-run`) | Yes |
|`lab task edit <id>`| Edit an existing task. `--from-file <task.yaml>` for YAML-only; `--from-dir <dir>` to also replace attachments like `main.py` (`--no-interactive`, `--dry-run`, `--timeout`) | Yes |
694
701
|`lab task upload <id> <path>`| Upload files/directories into an existing task (`--no-interactive`) | Yes |
695
702
|`lab task delete <id>`| Delete a task (`--no-interactive` to skip confirmation) | Yes |
696
703
|`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 |
Copy file name to clipboardExpand all lines: .agents/skills/transformerlab-cli/references/commands.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,25 @@ Add a new task from a local directory containing `task.yaml`, or from a Git repo
120
120
121
121
**JSON output:** Returns the created task object.
122
122
123
+
### `task edit <task_id>`
124
+
125
+
Update an existing task on the server. Three modes:
126
+
127
+
| Option | Description |
128
+
|---|---|
129
+
| (no flag) | Interactive — fetches current `task.yaml`, opens `$EDITOR`, validates and PUTs it back. YAML-only. |
130
+
|`--from-file <path>`| Replace **only**`task.yaml` from the given path. Leaves `main.py` and other attachments untouched on the server. |
131
+
|`--from-dir <path>`| Replace `task.yaml`**and** sibling files (e.g. `main.py`, configs). Zips the directory, uploads, and applies. **Use this whenever the task's `run` references a script file you've also modified — `--from-file` alone will desync the YAML from the script.**|
132
+
|`--no-interactive`| Skip confirmation prompt (required in automated contexts) |
133
+
|`--dry-run`| With `--from-dir`, preview the upload without submitting |
134
+
|`--timeout <seconds>`| Request timeout for fetch/validate/save (default: 300) |
135
+
136
+
`--from-file` and `--from-dir` are mutually exclusive.
137
+
138
+
### `task upload <task_id> <path>`
139
+
140
+
Upload additional files (or a whole directory) into an existing task without touching `task.yaml`. Useful when you want to add an attachment to a task whose YAML is already correct.
0 commit comments