run_experiment

run_experiment(
    spec,
    *,
    task_root=None,
    output_root='outputs',
    metrics_output_root=None,
    timestamp=None,
    pull_model=True,
    start_ollama_if_needed=True,
    quantization_type=None,
)

Run one end-to-end experiment and evaluate it against ground truth.

Parameters

Name Type Description Default
spec ExperimentSpec Concrete experiment specification to execute. required
task_root str | Path | None Optional directory containing user-defined task folders with codebook.json and ground-truth.csv. If omitted, bundled example tasks are used when the task name matches one shipped with the package. None
output_root str | Path Root directory where per-run outputs should be created. 'outputs'
metrics_output_root str | Path | None Directory for aggregate metrics CSV files. Defaults to output_root / "metrics". None
timestamp str | None Optional timestamp string to control output folder naming. None
pull_model bool If True, run ollama pull for spec.model before execution. Defaults to True so experiment runs ensure the requested model is available. True
start_ollama_if_needed bool If True, try to auto-start a local Ollama server when the default local host is not already reachable. Defaults to True so experiment runs can bring up local Ollama automatically when needed. True
quantization_type str | None Optional metadata field written to the metrics CSV. None

Returns

Name Type Description
ExperimentRunResult containing both annotation and metrics results.