[Presets] CLI refactoring - #4152
Merged
Merged
Conversation
`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
marked this pull request as draft
August 17, 2026 10:03
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dstack applydstack applyreplacesdstack preset create. It acceptstype: presetconfigurations like any other configuration type. All creation options are available as arguments (dstack apply -h preset). IDEs now validate and autocompletepreset.dstack.ymlfiles via the published schema.dstack preset exportdstack preset exportreplacesdstack preset apply. It writes the preset's service as a plaintype: serviceconfiguration with its patch files. The service is then deployed with the regulardstack 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.ymldstack preset getFixed to work for all presets, not only verified ones. The output carries a
status(running,interrupted,failed, orverified), 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 presetBENCHMARKcolumn reportstps/userandtps(previouslytok/s/userandtok/s).tps/useris derived from the mean TPOT instead of the median, which overstated the rate under speculative decoding.Backward compatibility
dstack preset createis deprecated; usedstack apply.dstack preset applyis removed; usedstack preset exportanddstack apply -f.🤖 Generated with Claude Code