Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions docs/implementation-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,21 @@ Preserve all selected algorithm profiles and standardized command arguments, MED
manifest envelopes, MEDS-DEV model.yaml interface, and final MEDS prediction output. Intermediate payload
formats and execution mechanisms are algorithm-owned: choose whatever preprocessing, featurization, framework,
batching or non-batching strategy, external executable, storage format, and algorithm architecture most
faithfully reproduce the source.
faithfully reproduce the source. When the source has no usable pipeline of its own, prefer standard MEDS tooling
for standard steps over bespoke code: MEDS-Transforms stages (code filtering, normalization, quantile binning,
time-delta tokens) and meds-torch-data for tensorized loading, pinned like any dependency. Keep
algorithm-specific representations in the algorithm package and record which steps use which tool.

Write the expensive paths (training, inference, generation, featurization) for the full dataset, not the
fixture: reuse shared work (prefix/prompt caches, last-position outputs), batch to available memory, avoid
per-item Python loops and host-device synchronizations in inner loops, run inference in the training dtype with
fused kernels, bound memory by the longest realistic input, and keep results independent of batch size. Before
any full-data launch, time a realistic slice and project each step's full-data cost (time per unit x units, peak
memory) in IMPLEMENTATION_REPORT.md; optimize or ask when it exceeds the approved resources. Long-running steps
stream progress through logging (phases with planned sizes, step out of total, training and tuning loss,
inference counts): aggregates and configuration only, never subject IDs, times, codes, values, labels,
predictions or sample rows. docs/IMPLEMENTATION_GUIDE.md ("Progress logging", "Efficiency at realistic scale")
gives the details.

When predicates are needed, reuse MEDS-DEV predicates for the selected dataset if available; otherwise,
use reviewed external predicates for that dataset and record their provenance. Decide within the algorithm
Expand Down Expand Up @@ -230,7 +244,8 @@ predicate interpretation, and the proposed MIMIC-IV demo execution. Only after a

There must be zero algorithm_stub skips. Report exact pass/skip counts and account for every remaining skip.
Update IMPLEMENTATION_REPORT.md with the demo cohort, final-output coverage, predicate provenance,
environment, wall time, peak process-tree PSS/RSS, GPU measurements when available, failures, and fixes.
environment, wall time, peak process-tree PSS/RSS, GPU measurements when available, failures, fixes, and
each step's projected full-data cost.
Ask for a second human review before launching the selected full dataset through the repository's SLURM
interface. Review target-dataset compatibility, access, and resources separately from the MIMIC-IV demo.
Use the supplied, already prepared task bundle for the selected dataset. It must contain task configs,
Expand Down
Loading