Skip to content

[T-102b] Experiment runner + CLI experiment run|report (concurrency-limited) #109

Closed

Description

@CodewithJha

Task T-102b · Milestone M4 — Baselines + metrics + experiments · Size M · Priority P0 · Epic #4

Implements FR-EXP-001 · FR-EXP-002 · PR-10

Branch feat/t-102b-experiment-runner-cli-concurrency-limited — one task = one branch = one PR (doc 32 §6)

Summary

Implement experiments/runner.py: create/run campaigns from the plan with experiments.max_concurrent_campaigns, resume a partially finished experiment, compute metrics + statistics into experiments.results; CLI experiment run <yaml> and experiment report <id> (JSON/table; HTML in T-079).

Context / motivation

Implements UC-08 and the M4 exit criterion (EXP-02 analytic runs end-to-end).

Scope

In scope

  • Experiment status lifecycle (CREATED → RUNNING → COMPLETED/FAILED/CANCELLED).
  • Raw data export as Parquet (doc 19 §7).

Implementation guidance

  • Reuse inline campaign driver from T-045b for local runs; services mode just enqueues campaigns.
  • Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff PLR2004); public APIs typed (mypy strict) and documented.

Configuration keys

From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).

  • experiments.max_concurrent_campaigns

Acceptance criteria

  • Small experiment (2 strategies × 3 seeds × 30 budget on branin) completes end-to-end and stores comparison JSON matching doc 12 §3.5.
  • Restart resumes without re-running finished campaigns.
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • tests/integration/experiments/test_experiment_runner.py.

Dependencies

Blocked by: #108 (T-102a), #91 (T-045b), #104 (T-100a), #105 (T-100b), #106 (T-101a)

Blocks: #128 (T-103), #123 (T-064), #141 (T-079), #157 (T-084a)

Parallelization notes

Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:

  • backend/src/roboprobe/experiments/runner.py
  • backend/src/roboprobe/cli/experiment.py

Independent modules.

Definition of Done

Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-102b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.

References

Design docs: doc 14 §8 · doc 19 §4 · doc 19 §7 · doc 12 §3.5 · doc 03 §UC-08

Requirements: FR-EXP-001 · FR-EXP-002 · PR-10 (traceability: doc 28)

Activity

  1. added
    area:experimentsExperiment runner and EXP-xx protocols
    area:cliCommand-line interface
    priority:P0Critical path / blocks others
    milestone:M4M4 — Baselines + metrics + experiments
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCommand-line interfacearea:experimentsExperiment runner and EXP-xx protocolsmilestone:M4M4 — Baselines + metrics + experimentspriority:P0Critical path / blocks otherssize:M1-3 daystaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions