@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / ba991d5c84
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 23:15 UTC

[Bugfix] Fix FlexibleArgumentParser replaces _ with - for actual args (#5795)

Chang Su committed Jun 24, 2024 at 16:01 UTC ba991d5c84adbc0685075af88333c688ddb06011
1 file changed +7 -1
vllm/utils.py
+7 -1
@@ -822,7 +822,13 @@ class FlexibleArgumentParser(argparse.ArgumentParser):
822 processed_args = []
823 for arg in args:
824 if arg.startswith('--'):
825 - processed_args.append('--' + arg[len('--'):].replace('_', '-'))
825 + if '=' in arg:
826 + key, value = arg.split('=', 1)
827 + key = '--' + key[len('--'):].replace('_', '-')
828 + processed_args.append(f'{key}={value}')
829 + else:
830 + processed_args.append('--' +
831 + arg[len('--'):].replace('_', '-'))
832 else:
833 processed_args.append(arg)
834