Skip to content

config: organize scenario stacks into method sections#1642

Open
hubunt wants to merge 1 commit into
llm-d:mainfrom
hubunt:hubunt/scenario-sections
Open

config: organize scenario stacks into method sections#1642
hubunt wants to merge 1 commit into
llm-d:mainfrom
hubunt:hubunt/scenario-sections

Conversation

@hubunt

@hubunt hubunt commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Reorganize scenario stacks into the four well-defined sections proposed in #1064: common, standalone, modelservice, and fma.

Common settings are expanded into the effective configuration inherited by every standup method, while method-specific modelservice settings can be nested under modelservice. The resolved config.yaml remains flat for existing templates and execution steps.

Motivation

Fixes #1064.

Scenario stacks currently mix shared settings such as model, storage, and vllmCommon with method-specific settings such as prefill, decode, and inferenceExtension. This makes the scope of each field unclear and forces scenario files to rely on comment headers instead of an explicit YAML structure.

What changed

  • Added normalization for per-stack common sections before defaults, shared settings, and stack overrides are merged.
  • Extended modelservice nesting to support common, prefill, decode, inferenceExtension, and multinode in addition to the existing gateway/router sections.
  • Preserved override precedence: defaults < shared < stack < treatment/CLI.
  • Added clear validation errors when stack.common or shared.common is not a mapping.
  • Updated early workspace discovery to read common.workDir.
  • Reorganized the FMA example and OCP CI scenario using the sectioned layout.
  • Documented the new structure and backward-compatible flat spelling.
  • Added regression coverage for common inheritance, method-specific normalization, multi-stack sibling metadata, invalid structures, and end-to-end scenario rendering.

Testing

  • python -m pytest tests -q
    • 674 passed, 31 skipped.
  • python -m pytest tests/test_scenario_sections.py tests/test_hoist_modelservice_sections.py tests/test_config_schema.py -q
    • 62 passed.
  • pre-commit run
    • Byte compilation, full unit tests, changed-scenario dry-run rendering, secret scan, Ruff lint, and Ruff format all passed.
  • Rendered both migrated scenarios and compared their effective config.yaml dictionaries with the versions from upstream main.
    • config/scenarios/examples/fma.yaml: identical.
    • config/scenarios/cicd/ocp.yaml: identical.
  • git diff --check

Backward Compatibility

Legacy flat scenario keys remain supported and render unchanged. If both a legacy flat key and its sectioned spelling are present in the same scenario layer, the sectioned value wins. Treatment and CLI overrides continue to take final precedence.

The modelservice Helm chart's own common values can be written as modelservice.common, avoiding ambiguity with the stack-level common section.

Checklist

  • My changes follow the style guidelines of this project.
  • I have performed a self-review of my changes.
  • I confirm that pre-commit run was run and all checks passed.
  • I have updated the documentation accordingly.

@Vezio Vezio added the do-not-merge Indicates that a PR should not merge label Jul 15, 2026
@Vezio

Vezio commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Pretty good intentions here to solve that issue, tagging as DNM for now until we can go through a bit more testing to ensure existing functionality doesn't break. Thank you for these changes, this is an amazing step forward to reduce redundant configurations.

@Vezio

Vezio commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

In the meantime, can you resolve some of the conflicts being reported above?

Signed-off-by: hubunt <150658615+hubunt@users.noreply.github.com>
@hubunt
hubunt force-pushed the hubunt/scenario-sections branch from 1dbf63f to 04aeb0d Compare July 16, 2026 05:21
@hubunt

hubunt commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Conflicts are resolved and the branch is rebased onto current main. The updated signed head is 04aeb0d. I preserved the upstream OCP scenario additions (maxModelLen, blockSize, and vLLM flags) inside the new common section. Full tests pass: 674 passed, 31 skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Indicates that a PR should not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-organize the scenarios yaml files with well-defined sections.

2 participants