[Config Refactor 2.5/N] Centralize pipeline registry#2915
Merged
lishunyang12 merged 6 commits intovllm-project:mainfrom Apr 19, 2026
Merged
[Config Refactor 2.5/N] Centralize pipeline registry#2915lishunyang12 merged 6 commits intovllm-project:mainfrom
lishunyang12 merged 6 commits intovllm-project:mainfrom
Conversation
… in pipeline.py Moves pipeline declarations to vllm_omni/config/pipeline_registry.py (one dict per category, keyed by model_type -> (module, var)), mirroring vLLM's models/registry.py. _PIPELINE_REGISTRY is now a lazy proxy that imports the module on first lookup, so a missed registration is impossible to hide in a per-model pipeline.py. - New: vllm_omni/config/pipeline_registry.py (_OMNI_PIPELINES, _DIFFUSION_PIPELINES, union _VLLM_OMNI_PIPELINES) - stage_config: replace dict _PIPELINE_REGISTRY with _LazyPipelineRegistry; drop the now-unnecessary _discover_all_pipelines walk. - qwen2_5_omni / qwen3_omni / qwen3_tts pipeline.py: remove register_pipeline() self-calls; pipelines are declared centrally now. - register_pipeline() kept public for plugins/tests; dynamic registrations override the central entry. Addresses vllm-project#2887 item 4 and vllm-project#2383 (comment). Preparatory work for #3/N (17 single-stage diffusion models). Signed-off-by: lishunyang <lishunyang12@163.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…iction Restores the ``del _PIPELINE_REGISTRY[model_type]`` API that the old plain-dict registry supported. Deleting a dynamically-registered entry (added via register_pipeline) removes it from the cache; deleting a central-registry-declared model_type raises KeyError with a hint pointing at pipeline_registry.py. Fixes tests/test_config_factory.py::TestPipelineRegistry::test_register_and_lookup. Signed-off-by: lishunyang <lishunyang12@163.com>
…inheritance test with overlay
build_stage_runtime_overrides: ``model``, ``stage_id``, ``log_stats`` and
``stage_configs_path`` are all in SHARED_FIELDS — they are set uniformly
by the orchestrator, not per-stage. Previously internal_blacklist_keys()
subtracted SHARED_FIELDS from orchestrator_field_names(), so these keys
leaked into a stage's runtime_overrides dict (e.g. a user passing
--model foo made every stage see {"model": "foo"} as a per-stage override).
Fix: default internal_keys to `internal_blacklist_keys() | SHARED_FIELDS`.
Fixes tests/test_config_factory.py ::test_cli_override_excludes_internal_keys,
::test_per_stage_override_excludes_internal_keys,
::test_build_stage_runtime_overrides_ignores_other_stage_and_internal_keys.
test_ci_inherits_from_main: CI overlay
(tests/utils._CI_OVERLAYS["qwen3_omni_moe"]) now explicitly sets
async_chunk: False (added in vllm-project#2383 fix #53) to override the base yaml.
Update the assertion to match current behaviour and document why.
Signed-off-by: lishunyang <lishunyang12@163.com>
…t-filter test This test overrides ``internal_keys`` explicitly instead of relying on the default (which now merges SHARED_FIELDS). When caller supplies their own filter set they opt out of the default protection, so the test data's ``stage_0_model`` wasn't being filtered. Match the default behaviour by passing the same union so the assertion "model not in overrides" holds. Signed-off-by: lishunyang <lishunyang12@163.com>
Collaborator
Author
I need to fix some pytests as some of them invoke pre-existing bugs from previsou prs. |
Collaborator
Author
Solved now. |
Signed-off-by: lishunyang <lishunyang12@163.com>
lvliang-intel
pushed a commit
to lvliang-intel/vllm-omni
that referenced
this pull request
Apr 20, 2026
Signed-off-by: lishunyang <lishunyang12@163.com>
This was referenced Apr 20, 2026
11 tasks
10 tasks
This was referenced Apr 21, 2026
qinganrice
pushed a commit
to qinganrice/vllm-omni
that referenced
this pull request
Apr 23, 2026
Signed-off-by: lishunyang <lishunyang12@163.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.
Summary
Moves all in-tree
PipelineConfigdeclarations to a single central registry (vllm_omni/config/pipeline_registry.py), mirroring vLLM'svllm/model_executor/models/registry.pypattern._PIPELINE_REGISTRYis now a lazy proxy that imports the per-modelpipeline.pymodule on first lookup, so a missed registration is impossible to hide in a scattered per-model file.Preparatory work for PR 3/N (single-stage diffusion models), which will add 17 more pipeline entries. Keeping registrations centralized makes that addition one-line-per-model.
Motivation
Implements the registry centralization requested in @alex-jw-brooks's review comment on #2383:
Resolves #2887 item 4.
Changes
vllm_omni/config/pipeline_registry.pydeclares_OMNI_PIPELINESand_DIFFUSION_PIPELINESdicts ofmodel_type -> (module_path, variable_name).vllm_omni/config/stage_config.py: replaces the dict_PIPELINE_REGISTRYwith_LazyPipelineRegistry; drops the now-redundant_discover_all_pipelinesfilesystem walk.register_pipeline()remains public for out-of-tree plugins and test fixtures, with dynamic registrations overriding the central entry.tests/config/test_pipeline_registry.py(new): covers central declarations, lazy loading, dynamic registration, and override semantics.tests/test_config_factory.py::TestPipelineDiscovery: updated to the lazy-load API; removed the now-stale_discover_all_pipelinestest.Non-goals
PipelineConfig/StagePipelineConfigschema.Test plan
pre-commit run --all-filespassespytest tests/config/test_pipeline_registry.py -vpytest tests/test_config_factory.py -vcc @alex-jw-brooks