Repository navigation
Conversation
|
Waiting for committer approval — /ci run Automatic checks passed. Required expensive checks have not run yet; this is not a test failure. A committer with repository write, maintain or admin permission can start the required checks by commenting: Contributors without that permission do not need to request authorization themselves. Pending qualification: Revision Approval applies to this revision only. New commits require fresh qualification. |
|
Tick the box to add this pull request to the merge queue (same as
|
Zi-Yi-Ming
left a comment
There was a problem hiding this comment.
Thanks for the fix! Rechecked ee037dda: the models-file loader and runtime now consistently reject duplicate effective names, while distinct explicit aliases still work. The focused local checks and Model Runtime CI pass. LGTM; required E2E qualification remains before merge.
TwilightTechie
left a comment
There was a problem hiding this comment.
Good edge coverage — the cross-org collision and the name-omitted-vs-explicit cases in test_engine_args pin down exactly where the uniqueness check used to miss.
subin9
left a comment
There was a problem hiding this comment.
Thanks, the effective-name check fixes the cases in the issue. One case still collides: label switches to the package's model_name after loading, so two unnamed entries at different paths that hold the same package still overwrite each other in /health. Could the check also cover the loaded label, or could the label stay on the pre-load name?
…ed in model runtime Multi-model configurations loaded through ServeConfig or a --models YAML file bypassed duplicate identity validation when name was omitted, because load_models_file and Runtime.__init__ only evaluated entries where config.name was truthy. Because ServedModel.label falls back to the model path's trailing name (name_of), duplicate model instances or collisions between explicit and inferred model labels passed validation silently, causing shadowing during lookup and clobbering health state entries in ProcessHealth.describe(). Furthermore, ServedModel.label previously switched to package model_name after loading, causing colliding /health keys for distinct unnamed model paths sharing a package. Resolve this by: 1. Moving the name_of helper to vllm_srun.config as a public function to avoid circular imports. 2. Enforcing uniqueness on effective names (config.name or name_of(config.model)) in load_models_file. 3. Keeping ServedModel.label stable on the pre-load effective name (config.name or name_of(config.model)) across model lifecycle so health and metrics keys do not mutate or collide post-load. 4. Enforcing uniqueness on [served.label for served in self.served] in Runtime.__init__. 5. Adding regression test coverage in test_engine_args.py and test_cli.py covering unnamed duplicates, cross-namespace collisions, inferred-vs-explicit alias collisions, and preserving distinct health keys for distinct paths sharing a package. Closes vllm-project#5347 Signed-off-by: Vardhman Gupta <[email protected]>
Thanks @subin9, great catch! Keeping I updated Pushed the update in |
abhinav-m22
left a comment
There was a problem hiding this comment.
Thanks for taking the nit and rebasing. LGTM.
Closes #5347
Purpose
When configuring multi-model serving in the model runtime via a
--modelsfile orServeConfig, entries without an explicitnamefield bypassed duplicate identity validation because uniqueness was only checked whenconfig.namewas truthy (config.py:268andruntime.py:872).Because
ServedModel.labelfalls back to_name_of(config.model), duplicate model entries or collisions between explicit aliases and another model's derived name passed validation silently:ProcessHealth.describe()returns a dictionary keyed byserved.label, causing colliding model entries to overwrite earlier ones and conceal health states.Runtime.lookup(name)matches the first model inself.served, silently shadowing subsequent instances.This PR fixes both validation sites by checking effective names (
config.name or _name_of(config.model)) inload_models_fileand[served.label for served in self.served]inRuntime.__init__. To prevent circular import cycles betweenvllm_srun.runtimeandvllm_srun.config,_name_ofis moved tovllm_srun.config.Owned by
wg/router-models-inference-runtime.Test Plan
src/model-runtime/tests/test_engine_args.py:ValueError: served model names must be unique.ValueError: served model names must be unique.ValueError: served model names must be unique.opt-0,opt-1) passes and correctly reports both models indescribe().load_models_filerejects unnamed duplicate and colliding model entries withValueError: ... duplicate model name ....test_malformed_models_files_are_refusedinsrc/model-runtime/tests/test_cli.py.Test Result
pytest test_engine_args.py: 24 passed in 7.12s (100% pass, including all 8 new regression test cases).ruff check: All checks passed with 0 errors/warnings.classify_pr_changes.py: Correctly classified under domainmodel-runtime.Semantic Router PR Checklist
[Feature],[Bug],[Docs],[Test],[Research],[Community], or[CI/Build][Router][Docs]; affected modules belong in labels and the PR bodyacceptedissue with exactly one owner: onewg/*label for project work orowner/maintainersfor repository governancegit commit -s