Skip to content

Commit

Permalink
[Bugfix] Fix FlexibleArgumentParser replaces _ with - for actual args (
Browse files Browse the repository at this point in the history
  • Loading branch information
CatherineSue authored and prashantgupta24 committed Jun 28, 2024
1 parent b8897c0 commit 2d30ec8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,13 @@ def parse_args(self, args=None, namespace=None):
processed_args = []
for arg in args:
if arg.startswith('--'):
processed_args.append('--' + arg[len('--'):].replace('_', '-'))
if '=' in arg:
key, value = arg.split('=', 1)
key = '--' + key[len('--'):].replace('_', '-')
processed_args.append(f'{key}={value}')
else:
processed_args.append('--' +
arg[len('--'):].replace('_', '-'))
else:
processed_args.append(arg)

Expand Down

0 comments on commit 2d30ec8

Please sign in to comment.