Skip to content

[Core] Validate PipelineConfig in __post_init__ - #6829

Merged
hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
alex-jw-brooks:validate_intree_pipes
Sep 1, 2026
Merged

hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
alex-jw-brooks:validate_intree_pipes

Conversation

@alex-jw-brooks

@alex-jw-brooks alex-jw-brooks commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Follow-up to #6291; rather than having a separate validate() function that we can call to get a list of errors, we should actually validate & raise an error if a PipelineConfig is not correctly configured. This will ensure that we do not accidentally create invalid PipelineConfig objects in vLLM Omni, and also is a better user experience when registering out of tree pipelines (i.e., PipelineConfig objects should explode as early as possible rather than deferring until we try to register it).

Errors surface as being joined by \n\t if there are more than one. E.g.,

from vllm_omni.config.stage_config import PipelineConfig, StagePipelineConfig

PipelineConfig(
    model_type="foobar",
    stages=[
        StagePipelineConfig(stage_id=0, model_stage="a"),
    ]
)

will raise

ValueError: PipelineConfig initialization failed with the following error(s): No terminal stage (stage with final_output=True)
from vllm_omni.config.stage_config import PipelineConfig, StagePipelineConfig

PipelineConfig(
    model_type="foobar",
    stages=[
        StagePipelineConfig(stage_id=0, model_stage="a"),
        StagePipelineConfig(stage_id=0, model_stage="a"),
    ]
)

will raise

ValueError: PipelineConfig initialization failed with the following error(s): 
        Duplicate stage IDs found
        No terminal stage (stage with final_output=True)

to try to keep it readable.

CC @lishunyang12 @m0g3r @hsliuustc0106 - PTAL, thanks!

Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to belong to: docs/design/module/vllm_omni_config.md.

Module owners: @lishunyang12 @alex-jw-brooks

@alex-jw-brooks, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

Comment thread vllm_omni/config/stage_config.py Outdated
Comment thread vllm_omni/config/stage_config.py Outdated
@hsliuustc0106 hsliuustc0106 added core related to core module: cache, scheduler, engine, worker, modelrunner high priority high priority issue, needs to be done asap labels Aug 30, 2026

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two findings, both inlined:

  • P1 (stage_config.py:306): eager validation raises for three test files the PR does not update — tests/config/test_pipeline_registry.py:33,44, tests/config/test_omni_config.py:1042,1072 (stageless constructions) and tests/utils/test_tracking_parser.py:33 (module-level pipeline with no final_output=True stage → whole-module collection error). No test lane ran on this PR, so the cpu lanes go red on merge. Fix: give these constructions a minimal terminal stage like SINGLE_STAGE_PIPE_CFG.
  • P3 (stage_config.py:342): maybe_get_validation_errors_as_str is a single-caller helper — consider inlining into __post_init__.

Otherwise clean: verified there are no leftover .validate() callers and no in-tree production path constructs a PipelineConfig without stages, so the eager-fail design itself is safe in-tree.

Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
@alex-jw-brooks

Copy link
Copy Markdown
Collaborator Author

Thanks @hsliuustc0106! I agree with your points. I inlined the helper and added the missing stage to other PipelineConfig calls, I think it's ready for another look when you have time!

@hsliuustc0106 hsliuustc0106 added the ready label to trigger buildkite CI label Sep 1, 2026

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hsliuustc0106
hsliuustc0106 merged commit a65e89c into vllm-project:main Sep 1, 2026
8 of 9 checks passed
VLa1111 added a commit to VLa1111/vllm-omni that referenced this pull request Sep 1, 2026
main added revision=od_config.revision to the from_pretrained calls (PR
vllm-project#6829); the CPU-offload branch reworked vae loading to conditional
placement. Keep both: revision passthrough plus loader-managed placement
under enable_cpu_offload / enable_layerwise_offload.

Signed-off-by: VLa1111 <vyu112@foxmail.com>
JoseCarlosGarcia95 pushed a commit to valendra-tech/vllm-omni that referenced this pull request Sep 5, 2026
Signed-off-by: Alex Brooks <albrooks@redhat.com>
ZhengWG pushed a commit to ZhengWG/vllm-omni that referenced this pull request Sep 8, 2026
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: ZhengWG <zwg0606@gmail.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core related to core module: cache, scheduler, engine, worker, modelrunner high priority high priority issue, needs to be done asap ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants