Skip to content

[Presets] CLI refactoring - #4152

Merged
peterschmidt85 merged 3 commits into
masterfrom
preset-cli-refactor
Aug 17, 2026
Merged

[Presets] CLI refactoring#4152
peterschmidt85 merged 3 commits into
masterfrom
preset-cli-refactor

Conversation

@peterschmidt85

@peterschmidt85 peterschmidt85 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

dstack apply

dstack apply replaces dstack preset create. It accepts type: preset configurations like any other configuration type. All creation options are available as arguments (dstack apply -h preset). IDEs now validate and autocomplete preset.dstack.yml files via the published schema.

$ dstack apply -f preset.dstack.yml --trials 5 --fleet mi300x-fleet

dstack preset export

dstack preset export replaces dstack preset apply. It writes the preset's service as a plain type: service configuration with its patch files. The service is then deployed with the regular dstack apply -f, with the deployer's own name, gateway, and profile.

$ dstack preset export qwen38-27b -f service.dstack.yml
$ dstack apply -f service.dstack.yml

dstack preset get

Fixed to work for all presets, not only verified ones. The output carries a status (running, interrupted, failed, or verified), so the configuration is visible while creation is still running.

$ dstack preset get qwen38-27b-mi300x --json
{"status": "running", "id": "6900d9d7", "name": "qwen38-27b-mi300x", "configuration": {"base": "Qwen/Qwen3.8-27B", "min_context_length": 1000000, ...}, "submitted_at": "2026-08-16T00:28:45Z"}

dstack preset

  • The BENCHMARK column reports tps/user and tps (previously tok/s/user and tok/s).
  • tps/user is derived from the mean TPOT instead of the median, which overstated the rate under speculative decoding.

Backward compatibility

  • dstack preset create is deprecated; use dstack apply.
  • dstack preset apply is removed; use dstack preset export and dstack apply -f.

🤖 Generated with Claude Code

`dstack preset get --json` now returns the requested configuration for a
preset whose creation is still running (or was interrupted/failed), with a
`status` field distinguishing it from verified presets. `dstack preset
export` replaces `dstack preset apply`: it writes the preset's service as a
plain `type: service` configuration with its patch files, deployable with
`dstack apply -f`. The displayed tok/s/user now derives from mean TPOT
rather than p50, which under MTP's right-skewed TPOT overstated the
delivered rate by ~25%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peterschmidt85 peterschmidt85 changed the title [Presets] Preset status, in-flight get, and preset export [Presets] CLI refactoring Aug 17, 2026
@peterschmidt85
peterschmidt85 marked this pull request as draft August 17, 2026 10:03
Andrey Cheptsov and others added 2 commits August 17, 2026 15:40
`dstack apply` now accepts `type: preset` configurations through a
PresetConfigurator registered like every other configuration type, with
the full creation flag set and `dstack apply -h preset` help. The preset
configuration model moves from the CLI into core models, joins
AnyApplyConfiguration so the core parser discriminates it natively, and
joins the published IDE schema so editors validate and complete
`preset.dstack.yml` files. `dstack preset create` remains as a deprecated
thin adapter over the same configurator. The displayed metric labels
follow the industry vocabulary: `tps/user` and `tps`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`_filter_presets` reads `base` and `model`, which only `VerifiedPreset`
carries, and every caller passes verified lists; the annotations said
`Preset`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peterschmidt85
peterschmidt85 marked this pull request as ready for review August 17, 2026 16:16
@peterschmidt85
peterschmidt85 merged commit 0e828a9 into master Aug 17, 2026
39 of 40 checks passed
@peterschmidt85
peterschmidt85 deleted the preset-cli-refactor branch August 17, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant