Fix command-line arguments being ignored
This commit is contained in:
parent
ff5d3d2d09
commit
5075087461
2 changed files with 7 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import argparse
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -6,7 +7,6 @@ import yaml
|
|||
|
||||
from modules.logging_colors import logger
|
||||
|
||||
|
||||
# Model variables
|
||||
model = None
|
||||
tokenizer = None
|
||||
|
@ -187,6 +187,11 @@ parser.add_argument('--multimodal-pipeline', type=str, default=None, help='The m
|
|||
|
||||
args = parser.parse_args()
|
||||
args_defaults = parser.parse_args([])
|
||||
provided_arguments = []
|
||||
for arg in sys.argv[1:]:
|
||||
arg = arg.lstrip('-').replace('-', '_')
|
||||
if hasattr(args, arg):
|
||||
provided_arguments.append(arg)
|
||||
|
||||
# Deprecation warnings
|
||||
for k in ['chat', 'notebook', 'no_stream']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue