Skip to content

[T-051b] S-LHS and S-SOBOL space-filling baselines #101

Closed

Description

@CodewithJha

Task T-051b · Milestone M4 — Baselines + metrics + experiments · Size S · Priority P1 · Epic #4

Implements FR-SEL-001 · PR-04

Branch feat/t-051b-s-lhs-and-s-sobol — one task = one branch = one PR (doc 32 §6)

Summary

Implement LHSStrategy (design of size B generated at start with optimization='random-cd', consumed in order, stored in state) and SobolStrategy (scrambled, blocks of 2^m consumed in order).

Context / motivation

Space-filling baselines represent good non-adaptive practice and isolate the value of learning from mere coverage.

Scope

In scope

  • selection/baselines/lhs.py, selection/baselines/sobol.py; entry points S-LHS, S-SOBOL.
  • Resumable state (index into design).

Implementation guidance

  • For LHS, store the full design in state_dict (B × d floats is small) or its seed + index — choose seed + index and regenerate deterministically.
  • 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.

Acceptance criteria

  • Contract suite passes.
  • LHS stratification property holds for the first B points; Sobol prefix balance.
  • 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/unit/selection/test_lhs_sobol.py.

Dependencies

Blocked by: #84 (T-050a)

Blocks: no other task (leaf)

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/selection/baselines/lhs.py
  • backend/src/roboprobe/selection/baselines/sobol.py

Parallel with T-051a/T-051c.

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-051b (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 07 §3

Requirements: FR-SEL-001 · PR-04 (traceability: doc 28)

External:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:selectionScenario selection strategies (BO, LSE, PROBE, baselines)good first issueGood for newcomersmilestone:M4M4 — Baselines + metrics + experimentspriority:P1Required for milestone exitsize:S<= 1 daytaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions