Skip to content

Commit 5cef3ca

Browse files
authored
[vllm] fix: build_app() missing 1 required positional argument: 'supported_tasks' (verl-project#5093)
Introduced by vllm-project/vllm@76139d0 ### What does this PR do? > Add **concise** overview of what this PR aims to achieve or accomplish. Reference related GitHub issues and PRs that help with the review. ### Checklist Before Starting - [X] Search for similar PRs. Paste at least one query link here: ... - [X] Format the PR title as `[{modules}] {type}: {description}` (This will be checked by the CI) - `{modules}` include `fsdp`, `megatron`, `veomni`, `sglang`, `vllm`, `rollout`, `trainer`, `ci`, `training_utils`, `recipe`, `hardware`, `deployment`, `ray`, `worker`, `single_controller`, `misc`, `perf`, `model`, `algo`, `env`, `tool`, `ckpt`, `doc`, `data`, `cfg`, `reward` - If this PR involves multiple modules, separate them with `,` like `[megatron, fsdp, doc]` - `{type}` is in `feat`, `fix`, `refactor`, `chore`, `test` - If this PR breaks any API (CLI arguments, config, function signature, etc.), add `[BREAKING]` to the beginning of the title. - Example: `[BREAKING][fsdp, megatron] feat: dynamic batching` ### Test > For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc. ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. ```python # Add code snippet or script demonstrating how to use this ``` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. ### Checklist Before Submitting > [!IMPORTANT] > Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review. - [X] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [X] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): `pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always` - [X] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs). - [X] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/volcengine/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [X] Once your PR is ready for CI, send a message in [the `ci-request` channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the `verl` Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [X] If your PR is related to the `recipe` submodule, please also update the reference to the submodule commit via `git submodule update --remote` or `cd recipe && git pull origin main`. Signed-off-by: Hollow Man <hollowman@opensuse.org>
1 parent db3a1b3 commit 5cef3ca

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

verl/workers/rollout/vllm_rollout/vllm_async_server.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,21 @@ async def run_server(self, args: argparse.Namespace):
412412
method="monkey_patch_model", kwargs={"vocab_size": len(self.model_config.tokenizer)}
413413
)
414414

415-
app = build_app(args)
416-
if _VLLM_VERSION > version.parse("0.11.0"):
417-
await init_app_state(engine_client, app.state, args)
415+
build_app_sig = inspect.signature(build_app)
416+
supported_tasks: tuple[Any, ...] = ()
417+
if "supported_tasks" in build_app_sig.parameters:
418+
supported_tasks = await engine_client.get_supported_tasks()
419+
app = build_app(args, supported_tasks)
418420
else:
421+
app = build_app(args)
422+
423+
init_app_sig = inspect.signature(init_app_state)
424+
if "vllm_config" in init_app_sig.parameters:
419425
await init_app_state(engine_client, vllm_config, app.state, args)
426+
elif "supported_tasks" in init_app_sig.parameters:
427+
await init_app_state(engine_client, app.state, args, supported_tasks)
428+
else:
429+
await init_app_state(engine_client, app.state, args)
420430
if self.replica_rank == 0 and self.node_rank == 0:
421431
logger.info(f"Initializing a V1 LLM engine with config: {vllm_config}")
422432

0 commit comments

Comments
 (0)