ModelOpt config system documentation#1472
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## shengliangx/schematize-cfg #1472 +/- ##
===========================================================
Coverage 76.85% 76.85%
===========================================================
Files 473 473
Lines 51429 51429
===========================================================
Hits 39524 39524
Misses 11905 11905
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a5e5062 to
0085e42
Compare
Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
Schema evolution / backward-compatibility guidance is removed from the config system guide because ModelOpt does not yet have a clear design for a formal compatibility window. The remaining content covers what the system actually guarantees today. Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
After the schematize-cfg rework, several documentation claims went stale: load_config now returns validated schema instances instead of plain dict/list data; RecipeMetadataConfig is a ModeloptBaseConfig subclass, not a TypedDict; recipe metadata and quantize sections are required; QuantizerCfgEntry is a Pydantic model with QuantizerAttributeConfig-typed cfg; ModeloptBaseConfig is a MutableMapping that rejects unknown keys. Update the three affected guides (11_config_system, 10_recipes, _quant_cfg) to match. Authored YAML/dict input remains the same; the clarifications cover the runtime shapes callers now see after loading and the new effective-schema precedence rule (schema_type argument over in-file modelopt-schema comment). Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
0085e42 to
d8c4bb7
Compare
What does this PR do?
Type of change: documentation
Adds a new Sphinx guide for the ModelOpt config system at
docs/source/guides/11_config_system.rst. The guide documents the general config contract and semantics rather than any single consumer:ModeloptBaseConfigschemas and validation boundariesimports/$importIt also explains why ModelOpt uses a small YAML DSL for composition: config files stay self-describing, reusable fragments can be authored as YAML, and resolved values are still validated against the Python schemas. Recipes are presented as one of the main applications of the shared config system; recipe-specific authoring continues to live in the existing recipes guide.
Usage
load_configresolves YAML composition (imports/$import) and returns plain data, which is then validated against the owning schema:Testing
git diff --cached --check— no whitespace issues.ModeloptBaseConfig/ Pydantic terminology consistently (no leftoverTypedDictreferences).sphinxis unavailable in this environment; will render locally before flipping out of draft.Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.). Docs-only change — no executable code paths affected.CONTRIBUTING.md: N/AAdditional Information
N/A