Skip to content

Commit

Permalink
🐛 fix nargs + or * (#140)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Runde <[email protected]>
  • Loading branch information
joerunde authored Sep 24, 2024
1 parent 5852586 commit 9031668
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vllm_tgis_adapter/tgis_utils/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ def _switch_action_default(action: argparse.Action) -> None:
# for non-string args, the string value of the env var will be parsed
# based on the action.type when setting from the default value
val = env_val
action.default = val

if action.nargs in ("+", "*"):
action.default = [val]
else:
action.default = val


class EnvVarArgumentParser(FlexibleArgumentParser):
Expand Down

0 comments on commit 9031668

Please sign in to comment.