Skip to content

Commit 638c277

Browse files
committed
Only set args if they are manually set on the commandline
Signed-off-by: Samuel Monson <[email protected]>
1 parent 2309d50 commit 638c277

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/guidellm/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
try:
3434
import uvloop
3535
except ImportError:
36-
uvloop = None # type: ignore[assignment] # Optional dependency
36+
uvloop = None # type: ignore[assignment] # Optional dependency
3737

3838
from guidellm.backends import BackendType
3939
from guidellm.benchmark import (
@@ -392,8 +392,10 @@ def run(**kwargs):
392392
disable_progress = kwargs.pop("disable_progress", False)
393393

394394
try:
395+
# Only set CLI args that differ from click defaults
396+
new_kwargs = cli_tools.set_if_not_default(click.get_current_context(), **kwargs)
395397
args = BenchmarkGenerativeTextArgs.create(
396-
scenario=kwargs.pop("scenario", None), **kwargs
398+
scenario=new_kwargs.pop("scenario", None), **new_kwargs
397399
)
398400
except ValidationError as err:
399401
# Translate pydantic valdation error to click argument error

0 commit comments

Comments
 (0)