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 jimpang committed Jul 24, 2024
1 parent 6e82665 commit 1dfd817
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 1dfd817

Please sign in to comment.