Skip to content

A3 — synthetic data generator - #4

Merged
jonathanbbechtel merged 2 commits into
mainfrom
feature/a3-datagen
Jun 2, 2026
Merged

A3 — synthetic data generator#4
jonathanbbechtel merged 2 commits into
mainfrom
feature/a3-datagen

Conversation

@jonathanbbechtel

Copy link
Copy Markdown
Contributor

Summary

  • Implements platform-ai#571 (A3 — Synthetic data generator).
  • Adds a fully deterministic, seed-driven generator (python -m benchmark.datagen.generator --seed 42 --out <dir>) that produces all three fixture packs: Operations, Outcomes, and Equity & Research.
  • All generated files conform to the column contracts in benchmark/schemas/fixture_schema.md.
  • Four intentional signals are baked in for downstream B/C tasks (see spec.py for exact values):
    1. MoM attendance trend: attendance rate rises +5 pp/month across the Q1 window (72% → 82%).
    2. Low-N AIAN subgroup: exactly 4 AIAN students program-wide; all AIAN subgroup metrics are suppressed (suppressed=true, attendance_rate=null).
    3. IEP attendance disparity: IEP students attend ~11 pp below non-IEP peers.
    4. Satisfaction dip-and-recovery: student satisfaction drops 0.4 Likert points in October and recovers in November; correlates with an elevated cancellation rate (18%) that month.

Files added

File Purpose
benchmark/datagen/spec.py Source-of-truth constants, signal values, and research reference text
benchmark/datagen/messiness.py Deterministic RNG helpers (weighted_choice, suppress_if_low_n, etc.)
benchmark/datagen/generator.py Pack generators + CLI (--seed, --out, --pack)
tests/unit/test_generator.py 41 tests: determinism, schema conformance, signal presence

Test plan

  • ruff check . — no issues
  • ruff format --check . — no reformats needed
  • mypy benchmark runner — no issues
  • pytest — 81 passed (41 new generator tests + 40 pre-existing)
  • pre-commit run --all-files — all hooks pass
  • CLI verified: python -m benchmark.datagen.generator --seed 42 --out <dir> writes all three pack directories
  • No fixture data committed — generator produces only into temp dirs during tests

🤖 Generated with Claude Code

Implements platform-ai#571.  Adds a fully deterministic, seed-driven
generator that produces all three fixture packs (Operations, Outcomes,
Equity & Research) with the intentional signals required by downstream
B/C tasks: MoM attendance trend (+5 pp/month across Q1), low-N AIAN
subgroup suppression (n=4 < threshold 10), IEP attendance disparity
(~11 pp gap), and satisfaction dip-and-recovery in October.

Files added:
- benchmark/datagen/spec.py      — source-of-truth constants + signal docs
- benchmark/datagen/messiness.py — deterministic RNG helpers (no global RNG)
- benchmark/datagen/generator.py — three pack generators + CLI entry point
- tests/unit/test_generator.py   — 41 tests: determinism, schema, signals
@pearleng-atlantis

Copy link
Copy Markdown
Error: This repo is not allowlisted for Atlantis.

Pre-commit pinned ruff v0.4.10 while CI installed ruff>=0.4 (0.15.15),
and the two disagreed on formatting test_generator.py — CI's format
check failed though pre-commit passed locally. Pin ruff==0.15.15 in dev
deps and bump the pre-commit ruff hook to v0.15.15 so local and CI use
the same formatter. Reformat the one affected file.
@jonathanbbechtel
jonathanbbechtel merged commit caa8948 into main Jun 2, 2026
2 checks passed
@jonathanbbechtel
jonathanbbechtel deleted the feature/a3-datagen branch June 2, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants