Skip to content

Commit ba30e44

Browse files
committed
Fix for output_path override not being respected
Signed-off-by: Mark Kurtz <mark.kurtz@neuralmagic.com>
1 parent 03b6596 commit ba30e44

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/guidellm/__main__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ def benchmark():
383383
help="Maximum global error rate across all benchmarks.",
384384
)
385385
def run(**kwargs):
386+
# Only set CLI args that differ from click defaults
387+
kwargs = cli_tools.set_if_not_default(click.get_current_context(), **kwargs)
388+
386389
# Handle remapping for request params
387390
request_type = kwargs.pop("request_type", None)
388391
request_formatter_kwargs = kwargs.pop("request_formatter_kwargs", None)
@@ -399,7 +402,7 @@ def run(**kwargs):
399402
kwargs["output_dir"] = path
400403
else:
401404
kwargs["output_dir"] = path.parent
402-
kwargs["outputs"] = (path.suffix.lstrip(".").lower(),)
405+
kwargs["outputs"] = (path.name,)
403406

404407
# Handle console options
405408
disable_console = kwargs.pop("disable_console", False)
@@ -408,10 +411,8 @@ def run(**kwargs):
408411
)
409412

410413
try:
411-
# Only set CLI args that differ from click defaults
412-
new_kwargs = cli_tools.set_if_not_default(click.get_current_context(), **kwargs)
413414
args = BenchmarkGenerativeTextArgs.create(
414-
scenario=new_kwargs.pop("scenario", None), **new_kwargs
415+
scenario=kwargs.pop("scenario", None), **kwargs
415416
)
416417
except ValidationError as err:
417418
# Translate pydantic valdation error to click argument error

0 commit comments

Comments
 (0)