Skip to content

run_experiment

Scope: builder · Signature: run_experiment(action: {plan|launch|abort|replicate|explain|autodoc|publishable|publish}, experiment_id: str | None = None, plan_id: str | None = None, parent_experiment_id: str | None = None, params: dict[str, Any] | None = None, idempotency_key: str | None = None) -> Any

Use to train: plan an experiment, launch the reviewed plan, then explain or publish it.

action="plan": parent_experiment_id = the run iterated on (its task and metric carry over unless restated); params experiment (workspace_id, name, type, dataset_id + the type's block: describe_platform("plan_schema", name=)), hypothesis {lever, expected_effect} stated BEFORE launch, stop_rule {metric, baseline_experiment_id, margin: a number or "fold_noise"}, note, run_all, explain_preset. Returns errors, warnings, config, estimate; nothing runs. "launch": plan_id — runs that exact plan, returns a job. Paid services (embedding providers) need approval: question_id = the gate they answered, else paid_services_approved=true after asking. With experiment_id: "abort", "replicate" (name; a copy, never a retrain), "explain" (explain_preset, refresh, fairness, sensitive_features; a job), "autodoc", "publishable", "publish" (result_kinds). explain_preset ∈ describe_platform("explain_presets"); only deep computes PDP, SHAP interactions, residual surrogate, archetype stability. Await its wait_handle.

Powered by: reviewed plans (backend/app/services/plans/) and the experiment runner.