-
Notifications
You must be signed in to change notification settings - Fork 629
[Feat] Add worker interface "update_config" #4277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8db11ca
c389f94
67a567b
3a45376
2030498
44f83d3
fe9f20d
09e49ec
c706545
b9a012a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,7 +44,7 @@ | |||||||||||||
| from vllm.attention.layer import Attention | ||||||||||||||
| from vllm.compilation.counter import compilation_counter | ||||||||||||||
| from vllm.compilation.monitor import set_cudagraph_capturing_enabled | ||||||||||||||
| from vllm.config import CUDAGraphMode, VllmConfig, get_layers_from_vllm_config | ||||||||||||||
| from vllm.config import CUDAGraphMode, VllmConfig, get_layers_from_vllm_config, update_config | ||||||||||||||
| from vllm.distributed import tensor_model_parallel_all_gather | ||||||||||||||
| from vllm.distributed.kv_transfer import (get_kv_transfer_group, | ||||||||||||||
| has_kv_transfer_group) | ||||||||||||||
|
|
@@ -4592,3 +4592,13 @@ def _generate_pcp_mtp_input( | |||||||||||||
| self.input_ids_pcp_full_cpu[:total_num_scheduled_tokens_pcp_full], | ||||||||||||||
| non_blocking=True, | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| def update_config(self, overrides: dict[str, Any]) -> None: | ||||||||||||||
| allowed_config_names = {"load_config", "model_config"} | ||||||||||||||
| for config_name, config_overrides in overrides.items(): | ||||||||||||||
| assert config_name in allowed_config_names, \ | ||||||||||||||
| f"Config `{config_name}` not supported. " \ | ||||||||||||||
| f"Allowed configs: {allowed_config_names}" | ||||||||||||||
|
Comment on lines
+4488
to
+4490
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using Additionally, sorting the Note that this change will require updating
Suggested change
|
||||||||||||||
| config = getattr(self, config_name) | ||||||||||||||
| new_config = update_config(config, config_overrides) | ||||||||||||||
| setattr(self, config_name, new_config) | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To align with the recommended change of raising a
ValueErrorfor invalid inputs inNPUModelRunner.update_config, this test should be updated to expect aValueError.