Skip to content

Commit e863516

Browse files
author
chibu
committed
include user scenario
1 parent 9d284c9 commit e863516

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/automation/tasks/scripts/guidellm_script.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ def clean_hocon_value(v):
6464

6565
from pathlib import Path
6666
from guidellm.benchmark.scenario import GenerativeTextScenario, get_builtin_scenarios
67-
print(get_builtin_scenarios())
68-
if len(get_builtin_scenarios()) > 0:
69-
current_scenario = GenerativeTextScenario.from_builtin(DEFAULT_GUIDELLM_SCENARIO, dict(guidellm_args))
67+
user_scenario = guidellm_args.get("scenario", "")
68+
if user_scenario:
69+
filepath = Path(os.path.join(".", "src", "automation", "standards", "benchmarking", f"{user_scenario}.json"))
70+
current_scenario = GenerativeTextScenario.from_file(filepath, dict(guidellm_args))
71+
#elif len(get_builtin_scenarios()) > 0:
72+
# current_scenario = GenerativeTextScenario.from_builtin(get_builtin_scenarios()[0], dict(guidellm_args))
7073
else:
7174
filepath = Path(os.path.join(".", "src", "automation", "standards", "benchmarking", f"{DEFAULT_GUIDELLM_SCENARIO}.json"))
7275
current_scenario = GenerativeTextScenario.from_file(filepath, dict(guidellm_args))

0 commit comments

Comments
 (0)