Skip to content

Commit 1fd1ad6

Browse files
author
root
committed
fix tests
1 parent e6af68e commit 1fd1ad6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fastdeploy/engine/args_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,11 @@ def from_cli_args(cls, args: FlexibleArgumentParser) -> "EngineArgs":
10451045
"""
10461046
Create an instance of EngineArgs from command line arguments.
10471047
"""
1048-
return cls(**{field.name: getattr(args, field.name) for field in dataclass_fields(cls)})
1048+
args_dict = {}
1049+
for field in dataclass_fields(cls):
1050+
if hasattr(args, field.name):
1051+
args_dict[field.name] = getattr(args, field.name)
1052+
return cls(**args_dict)
10491053

10501054
def create_speculative_config(self) -> SpeculativeConfig:
10511055
""" """

0 commit comments

Comments
 (0)