Skip to content

Commit 9791eda

Browse files
committed
Move CLI and output options out of scenario
1 parent 7e3be63 commit 9791eda

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/guidellm/__main__.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,19 +212,16 @@ def cli():
212212
@click.option(
213213
"--disable-progress",
214214
is_flag=True,
215-
default=not GenerativeTextScenario.model_fields["show_progress"].default,
216215
help="Set this flag to disable progress updates to the console",
217216
)
218217
@click.option(
219218
"--display-scheduler-stats",
220219
is_flag=True,
221-
default=GenerativeTextScenario.model_fields["show_progress_scheduler_stats"].default,
222220
help="Set this flag to display stats for the processes running the benchmarks",
223221
)
224222
@click.option(
225223
"--disable-console-outputs",
226224
is_flag=True,
227-
default=not GenerativeTextScenario.model_fields["output_console"].default,
228225
help="Set this flag to disable console output",
229226
)
230227
@click.option(
@@ -241,7 +238,6 @@ def cli():
241238
@click.option(
242239
"--output-extras",
243240
callback=parse_json,
244-
default=GenerativeTextScenario.model_fields["output_extras"].default,
245241
help="A JSON string of extra data to save with the output benchmarks",
246242
)
247243
@click.option(
@@ -314,18 +310,18 @@ def benchmark(
314310
max_requests=max_requests,
315311
warmup_percent=warmup_percent,
316312
cooldown_percent=cooldown_percent,
317-
show_progress=not disable_progress,
318-
show_progress_scheduler_stats=display_scheduler_stats,
319-
output_console=not disable_console_outputs,
320-
output_path=output_path,
321-
output_extras=output_extras,
322313
output_sampling=output_sampling,
323314
random_seed=random_seed,
324315
))
325316

326317
asyncio.run(
327318
benchmark_with_scenario(
328-
scenario=GenerativeTextScenario(**_scenario)
319+
scenario=GenerativeTextScenario(**_scenario),
320+
show_progress=not disable_progress,
321+
show_progress_scheduler_stats=display_scheduler_stats,
322+
output_console=not disable_console_outputs,
323+
output_path=output_path,
324+
output_extras=output_extras,
329325
)
330326
)
331327

src/guidellm/benchmark/scenario.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,5 @@ class Config:
5757
max_requests: Optional[int] = None
5858
warmup_percent: Optional[float] = None
5959
cooldown_percent: Optional[float] = None
60-
show_progress: bool = True
61-
show_progress_scheduler_stats: bool = True
62-
output_console: bool = True
63-
output_path: Optional[Union[str, Path]] = None
64-
output_extras: Optional[dict[str, Any]] = None
6560
output_sampling: Optional[int] = None
6661
random_seed: int = 42

0 commit comments

Comments
 (0)