Skip to content

feat(orchestration): served_model_name on model-serving services - #3323

Merged
prokotg merged 2 commits into
mainfrom
prokotg/vllm-served-model-name
Sep 11, 2026
Merged

prokotg merged 2 commits into
mainfrom
prokotg/vllm-served-model-name

Conversation

@prokotg

@prokotg prokotg commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add served_model_name to BaseModelServiceConfig so vLLM (and any future model-serving service type) can be told to serve a model under a name different from its model field, and so driver.policy_model auto-wiring picks up that same name.

  • Previously, driver.policy_model's auto-wiring set policy_model_name from service.model verbatim (SubmitConfig._resolve_and_validate_placements), with no way to account for extra_args telling the engine to serve under a different name (e.g. --served-model-name super-bf16 when model: is a local checkpoint path like /checkpoint). The evaluation harness then requested the model by the wrong name and vLLM rejected it, since it only recognizes the name(s) it was actually told to serve under.
  • New served_model_name: str | None field on BaseModelServiceConfig (not VllmServiceConfig-specific, so any future model-serving service type gets this for free) becomes the single source of truth for both sides: _vllm_base_flags emits --served-model-name from it, and policy_model_name auto-wiring reads the same field.
  • Falls back to model when unset, so existing configs are unaffected.

Changes

  • nemo_gym/orchestration/api.py β€” served_model_name field on BaseModelServiceConfig; policy_model_name auto-wiring uses service.served_model_name or service.model
  • nemo_gym/orchestration/executors/slurm_script.py β€” _vllm_base_flags emits --served-model-name (shell-quoted) when set
  • tests/unit_tests/test_orchestration_api.py, tests/unit_tests/test_slurm_script.py β€” coverage for the new field, its default fallback, and quoting

Test plan

  • pytest tests/unit_tests/test_orchestration_api.py -x
  • pytest tests/unit_tests/test_slurm_script.py -x

driver.policy_model's auto-wiring set policy_model_name from a service's
`model` field verbatim (SubmitConfig._resolve_and_validate_placements),
with no way to know that a user's own extra_args might tell the engine to
serve under a different name (e.g. --served-model-name super-bf16 when
model: is a local checkpoint path like /checkpoint). The evaluation
harness then requested the model by the wrong name and got rejected --
vLLM only recognizes the name(s) it was actually told to serve under.

served_model_name on BaseModelServiceConfig (not VllmServiceConfig
specifically -- the auto-wiring already treats any BaseModelServiceConfig
generically, and any future model-serving service type gets this for
free) gives both sides one source of truth: _vllm_base_flags emits
--served-model-name from it, and policy_model_name auto-wiring reads the
same field. Falls back to `model` when unset, so existing configs are
unaffected.

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
@yaoyu-33 yaoyu-33 added area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 11, 2026
marta-sd
marta-sd previously approved these changes Sep 11, 2026
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
@prokotg
prokotg enabled auto-merge (squash) September 11, 2026 13:32
@prokotg prokotg linked an issue Sep 11, 2026 that may be closed by this pull request
6 of 9 tasks
@prokotg
prokotg merged commit 3c58646 into main Sep 11, 2026
38 checks passed
@prokotg
prokotg deleted the prokotg/vllm-served-model-name branch September 11, 2026 13:37
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
## Summary

Add `served_model_name` to `BaseModelServiceConfig` so vLLM (and any
future model-serving service type) can be told to serve a model under a
name different from its `model` field, and so `driver.policy_model`
auto-wiring picks up that same name.

- Previously, `driver.policy_model`'s auto-wiring set
`policy_model_name` from `service.model` verbatim
(`SubmitConfig._resolve_and_validate_placements`), with no way to
account for `extra_args` telling the engine to serve under a different
name (e.g. `--served-model-name super-bf16` when `model:` is a local
checkpoint path like `/checkpoint`). The evaluation harness then
requested the model by the wrong name and vLLM rejected it, since it
only recognizes the name(s) it was actually told to serve under.
- New `served_model_name: str | None` field on `BaseModelServiceConfig`
(not `VllmServiceConfig`-specific, so any future model-serving service
type gets this for free) becomes the single source of truth for both
sides: `_vllm_base_flags` emits `--served-model-name` from it, and
`policy_model_name` auto-wiring reads the same field.
- Falls back to `model` when unset, so existing configs are unaffected.

## Changes

- `nemo_gym/orchestration/api.py` β€” `served_model_name` field on
`BaseModelServiceConfig`; `policy_model_name` auto-wiring uses
`service.served_model_name or service.model`
- `nemo_gym/orchestration/executors/slurm_script.py` β€”
`_vllm_base_flags` emits `--served-model-name` (shell-quoted) when set
- `tests/unit_tests/test_orchestration_api.py`,
`tests/unit_tests/test_slurm_script.py` β€” coverage for the new field,
its default fallback, and quoting

## Test plan

- [ ] `pytest tests/unit_tests/test_orchestration_api.py -x`
- [ ] `pytest tests/unit_tests/test_slurm_script.py -x`

---------

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Junkeun Yi <jkyi@nvidia.com>

This branch was previously deployed

1 inactive deployment
public β€” c052e015 Deployed Sep 11, 2026 by copy-pr-bot[bot] via release / finalize / notify #2795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[epic] orchestration: remote execution and job management for Gym evaluations

3 participants