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
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Write preset traces by default and add the dstack-presets skill (#4192)
Every preset session now writes the real-time trace to
~/.dstack/presets/<id>/trace.jsonl, along with the agent prompt and the
final report copy; the --debug flag is removed. A new dstack-presets
skill teaches AI agents to create and manage presets; it is not bundled
into the creation agent.
Co-authored-by: Andrey Cheptsov <andrey.cheptsov@github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: mkdocs/docs/concepts/presets.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ Alternatively, pass `--fleet` to `dstack apply`.
122
122
123
123
=== "Base"
124
124
125
-
Set `base` to let the creation agent select any compatible variant of the base model, including a different precision, quantization, or trusted fork.
125
+
Set `base` to let the agent select any compatible variant of the base model, including a different precision, quantization, or trusted fork.
126
126
127
127
```yaml
128
128
base: Qwen/Qwen2.5-7B-Instruct
@@ -240,6 +240,24 @@ Submit the run dsv4-flash? [y/n]: y
240
240
241
241
## Manage presets
242
242
243
+
### Watch presets
244
+
245
+
While a preset is being created, you can watch the progress of its trials and what the agent is doing.
246
+
247
+
The `dstack preset logs` command shows the progress log: one line per milestone, such as a trial finishing or the final service being verified. Pass `-f` to follow a running creation:
248
+
249
+
<divclass="termy">
250
+
251
+
```shell
252
+
$ dstack preset logs -f c83375b4
253
+
```
254
+
255
+
</div>
256
+
257
+
### Traces
258
+
259
+
The agent subprocess writes real-time traces to `~/.dstack/presets/<id>/trace.jsonl`: the agent's messages and every tool call with its result. Traces are the main way to analyze a session in depth — see [Protips](#protips).
For command options and agent settings, see the [`dstack preset` CLI reference](../reference/cli/dstack/preset.md).
292
310
293
-
## Troubleshooting
311
+
## Protips
294
312
295
-
To trace the agent's activity, pass `--debug` to `dstack apply`:
296
-
297
-
<divclass="termy">
313
+
Under the hood, presets run an agent as a subprocess, using the local `claude` CLI. This process writes a real-time trace to `~/.dstack/presets/<id>/trace.jsonl`. The subprocess is launched with a built-in harness: how to run trials, submit runs, benchmark, verify presets, and use `dstack`.
298
314
299
-
```shell
300
-
$ dstack apply -f preset.dstack.yml --debug
301
-
```
302
-
303
-
</div>
315
+
At the same time, it's recommended to create presets using your own agent — either via a CLI such as Claude Code, or inside your IDE. Your agent helps you design the preset configuration, formulate hypotheses, and — most importantly — analyze the session's traces as well as the trial results (stored under `~/.dstack/presets/<id>/trials/<n>/trial.json`), to decide what the next session can be and what instructions to give it via `prompt`.
304
316
305
-
The trace is written to `~/.dstack/presets/<id>/trace.jsonl` while the session runs. It contains the agent's messages and every tool call with its result.
317
+
> To help your agent use `dstack` and presets, install the [`dstack`](https://skills.sh/dstackai/dstack/dstack)
318
+
> and [`dstack-presets`](https://skills.sh/dstackai/dstack/dstack-presets) skills with `npx skills add dstackai/dstack`.
Create and manage dstack presets: a toolkit that streamlines model inference optimization with agents, and a portable preset format. Use together with the dstack skill, and only when the user explicitly asks to create a preset or manage existing presets, not for deploying or serving a model.
5
+
---
6
+
7
+
# dstack Presets
8
+
9
+
Use `/dstack` for CLI commands, YAML fields, apply behavior, fleets, and other
10
+
dstack syntax. This skill covers creating and managing presets.
11
+
12
+
## Overview
13
+
14
+
Presets offer two things: a toolkit that streamlines model inference optimization using agents, and a portable format that deploys the final preset to any cloud, Kubernetes cluster, or bare-metal fleet. A preset holds the serving configuration that produced the result, the benchmark it reached, and the exact hardware it was verified on.
15
+
16
+
Presets are used for three kinds of work: finding an optimized baseline, optimizing through patching source code, and supporting new hardware.
17
+
18
+
**When to use this skill:**
19
+
- The user explicitly asks to create a preset, or to optimize model inference via a preset
20
+
- Managing already created presets: watching sessions, listing, exporting, and deleting them via `dstack preset` commands
21
+
22
+
**When NOT to use this skill:**
23
+
- Deploying or serving a model: use a service instead (see the `dstack` skill)
24
+
25
+
## How to use presets
26
+
27
+
Follow the [presets documentation](https://dstack.ai/docs/concepts/presets.md).
0 commit comments