You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Epic OM-052 needs assembled training data for the DocType/Section model family before any training run, but the only synthetic generator today is training/synthetic/locale_phi.py for PHI. This sub-task adds a synthetic section-label corpus builder that emits token-classification examples (BIO section-boundary tags + a note-type label) from templated clinical notes, producing a leakage-checked JSONL dataset the recipe can consume. Actual GPU training is out of scope.
Scope
Add openmed/training/synthetic/section_labels.py generating templated notes with gold section boundaries (from clinical/sections.py canonical labels) and note-type labels.
Emit BIO-style section-boundary token tags plus a document-type label per example as JSONL, matching the corpus.py record contract.
Support a reproducible seed so a fixed seed yields byte-identical output; expose a build_section_dataset(seed, n) entrypoint.
Run a leakage check that no example text overlaps the synthetic eval fixtures (leakage-first) and stamp a dataset manifest.
Ensure only synthetic/public content is generated; DUA corpora are eval-only and never written to disk here.
Add unit tests for determinism, label validity against canonical section labels, and the leakage assertion.
Acceptance criteria
build_section_dataset(seed, n) writes JSONL with per-token section BIO tags and a document-type label per example.
A fixed seed produces byte-identical output across two runs (determinism unit-tested).
Every emitted section label is a member of the canonical section label set; invalid labels raise.
A leakage check asserts zero text overlap between generated data and the synthetic section eval fixtures.
New unit tests pass with .venv/bin/python -m pytest tests/unit/training/ -q.
No DUA or non-synthetic text is written; the builder is offline and deterministic.
Summary
Epic OM-052 needs assembled training data for the DocType/Section model family before any training run, but the only synthetic generator today is training/synthetic/locale_phi.py for PHI. This sub-task adds a synthetic section-label corpus builder that emits token-classification examples (BIO section-boundary tags + a note-type label) from templated clinical notes, producing a leakage-checked JSONL dataset the recipe can consume. Actual GPU training is out of scope.
Scope
Acceptance criteria
Out of scope
Files
Task: OM-818 · Milestone: v2.2 · Priority: P1 · Size: M
Depends on: OM-052 · Blocks: OM-819
Roadmap: v2.2 trustworthy clinical data exchange follow-on wave
Spec: PLANS/V2/EXECUTION/tasks/OM-818.md