Skip to content

Commit 4e05e6f

Browse files
committed
Unwrapped encapsulation and fix format
1 parent 7e99159 commit 4e05e6f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

vllm/utils.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,12 +1138,6 @@ def parse_args(self, args=None, namespace=None):
11381138
args = FlexibleArgumentParser._pull_args_from_config(args)
11391139

11401140
# Convert underscores to dashes and vice versa in argument names
1141-
processed_args = self._format_args(args)
1142-
1143-
return super().parse_args(processed_args, namespace)
1144-
1145-
def _format_args(self, args: List[str]) -> List[str]:
1146-
"""Convert underscores to dashes and vice versa in argument names"""
11471141
processed_args = []
11481142
for arg in args:
11491143
if arg.startswith('--'):
@@ -1157,8 +1151,8 @@ def _format_args(self, args: List[str]) -> List[str]:
11571151
else:
11581152
processed_args.append(arg)
11591153

1160-
return processed_args
1161-
1154+
return super().parse_args(processed_args, namespace)
1155+
11621156
@staticmethod
11631157
def _pull_args_from_config(args: List[str]) -> List[str]:
11641158
"""Method to pull arguments specified in the config file
@@ -1212,7 +1206,8 @@ def _pull_args_from_config(args: List[str]) -> List[str]:
12121206
# followed by rest of cli args.
12131207
# maintaining this order will enforce the precedence
12141208
# of cli > config > defaults
1215-
args = [args[0]] + [args[1]] + config_args + args[2:index] + args[index+2:]
1209+
args = [args[0]] + [args[1]] + config_args + \
1210+
args[2:index] + args[index+2:]
12161211

12171212
return args
12181213

0 commit comments

Comments
 (0)