MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / handle_run

Function handle_run

cli/main.py:409–435  ·  view source on GitHub ↗
(
    benchmark_file: str,
    benchmark_name: str,
    model_identifier: str | None,
    ip_addr: str,
    prompt_bundle_name: str = "default",
    config_file: str | None = None,
    output_file: str | None = None,
)

Source from the content-addressed store, hash-verified

407
408
409def handle_run(
410 benchmark_file: str,
411 benchmark_name: str,
412 model_identifier: str | None,
413 ip_addr: str,
414 prompt_bundle_name: str = "default",
415 config_file: str | None = None,
416 output_file: str | None = None,
417) -> int:
418 config = _resolve_config(config_file)
419 benchmark = find_benchmark_by_name(Path(benchmark_file), benchmark_name)
420 model = _resolve_model_spec(model_identifier, config)
421 request = build_task_request(
422 benchmark=benchmark,
423 model=model,
424 ip_addr=ip_addr,
425 config=config,
426 prompt_bundle_name=prompt_bundle_name,
427 )
428 result = TaskRunner().run(request)
429 payload = result.to_dict()
430
431 if output_file:
432 write_jsonl_record(output_file, payload)
433
434 print(json.dumps(payload, ensure_ascii=False, indent=2))
435 return 0 if result.status != "error" else 1
436
437
438def handle_experiment(

Callers 1

mainFunction · 0.85

Calls 8

find_benchmark_by_nameFunction · 0.90
build_task_requestFunction · 0.90
TaskRunnerClass · 0.90
write_jsonl_recordFunction · 0.90
_resolve_configFunction · 0.85
_resolve_model_specFunction · 0.85
runMethod · 0.45
to_dictMethod · 0.45

Tested by

no test coverage detected