This commit is contained in:
hailin 2025-07-09 12:55:49 +08:00
parent b42fec3418
commit d0f499bb1c
1 changed files with 17 additions and 2 deletions

View File

@ -227,15 +227,30 @@ def toggle_run(
if not is_running: if not is_running:
should_stop = False should_stop = False
if run_mode == "perf": if run_mode == "perf":
yield from run_perf(...) yield from run_perf(
inputs, native, other, output_choices,
api_url, api_token,
api_provider, dataset,
max_tokens, min_tokens, parallel_reqs,
max_prompt_len, num_requests,
model_override
)
elif run_mode == "eval": elif run_mode == "eval":
yield from run_eval_tool(...) yield from run_eval_tool(
inputs, native, other, output_choices,
api_url, api_token,
api_provider, dataset,
max_tokens, min_tokens, parallel_reqs,
max_prompt_len, num_requests,
model_override
)
elif run_mode == "app": elif run_mode == "app":
yield "[⚠️ 当前为 app 模式,请手动打开 http://localhost:7901 查看报告]", False, gr.update(value="Run Evaluation") yield "[⚠️ 当前为 app 模式,请手动打开 http://localhost:7901 查看报告]", False, gr.update(value="Run Evaluation")
else: else:
msg = stop_eval() msg = stop_eval()
yield msg, False, gr.update(value="Run Evaluation") yield msg, False, gr.update(value="Run Evaluation")
# ---------------- 输入源互斥逻辑 ---------------- # ---------------- 输入源互斥逻辑 ----------------
def enforce_input_exclusive_and_toggle_fields(selected): def enforce_input_exclusive_and_toggle_fields(selected):
order = ["API Models", "Local Models", "Benchmarks", "Custom Datasets"] order = ["API Models", "Local Models", "Benchmarks", "Custom Datasets"]