Skip to content

Commit 8a7434c

Browse files
lengrongfuekagra-ranjan
authored andcommitted
[Misc] update dict parse to EPLBConfig from json dumps to dict unpacking (vllm-project#23305)
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io> Signed-off-by: Ekagra Ranjan <3116519+ekagra-ranjan@users.noreply.github.com>
1 parent 945b76a commit 8a7434c

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

vllm/config/parallel.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import TYPE_CHECKING, Any, Literal, Optional, Union
77

88
import torch
9-
from pydantic import TypeAdapter, model_validator
9+
from pydantic import model_validator
1010
from pydantic.dataclasses import dataclass
1111
from torch.distributed import ProcessGroup, ReduceOp
1212
from typing_extensions import Self
@@ -56,13 +56,6 @@ class EPLBConfig:
5656
This is turned off by default since it will cause communication overhead.
5757
"""
5858

59-
@classmethod
60-
def from_cli(cls, cli_value: str) -> "EPLBConfig":
61-
"""Parse the CLI value for the compilation config.
62-
-O1, -O2, -O3, etc. is handled in FlexibleArgumentParser.
63-
"""
64-
return TypeAdapter(EPLBConfig).validate_json(cli_value)
65-
6659

6760
@config
6861
@dataclass

vllm/engine/arg_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,7 @@ def __post_init__(self):
455455
self.compilation_config = CompilationConfig(
456456
**self.compilation_config)
457457
if isinstance(self.eplb_config, dict):
458-
self.eplb_config = EPLBConfig.from_cli(json.dumps(
459-
self.eplb_config))
458+
self.eplb_config = EPLBConfig(**self.eplb_config)
460459
# Setup plugins
461460
from vllm.plugins import load_general_plugins
462461
load_general_plugins()

0 commit comments

Comments
 (0)