Skip to content

Implementation prompt: standard MEDS tooling, full-scale efficiency, progress logging - #26

Open
florian6973 wants to merge 1 commit into
mainfrom
prompt-tooling-efficiency-logging
Open

florian6973 wants to merge 1 commit into
mainfrom
prompt-tooling-efficiency-logging

Conversation

@florian6973

Copy link
Copy Markdown
Collaborator

Why

The implementation prompt (docs/implementation-prompt.md, also embedded in the prompt builder) leaves preprocessing entirely to the algorithm ("choose whatever preprocessing … most faithfully reproduce the source") and says nothing about scale or progress. Curiosity, which has no public source code:

  • reimplemented its tokenization in bespoke Polars code;
  • passed every fixture and demo gate;
  • then, on NWICU, ran out of GPU memory twice (pretraining stage 2 and generation), needed 29 min per prediction time in generation (about 2,700 GPU-h projected for the held-out set), and logged nothing during a 26 h pretraining.

What

In the algorithm-owned formats paragraph:

  • Standard MEDS tooling: when the source has no usable pipeline, prefer MEDS-Transforms stages (code filtering, normalization, quantile binning, time-delta tokens) and meds-torch-data for standard steps over bespoke code, pinned like any dependency. Algorithm-specific representations stay in the algorithm package, and the choice is recorded. The source's own pipeline still comes first (the unchanged Ponytail paragraph).
  • Efficiency at full-data scale: reuse shared work, batch to memory, no per-item Python loops or host-device syncs in inner loops, the training dtype with fused kernels, memory bounded by the longest realistic input, batch-independent results. Project each step's full-data cost from a timed realistic slice before any full-data launch, and optimize or ask when it exceeds the approved resources.
  • Progress logging: long steps stream aggregate-only progress; never subject IDs, times, codes, values, labels, predictions or rows. This fits the existing raw-data guard.
  • Demo report: also includes each step's projected full-data cost.

Both rules point to the template guide sections that hold the details: "Progress logging" (McDermottHealthAI/MEDS_algorithm_template#56, merged) and "Efficiency at realistic scale" (McDermottHealthAI/MEDS_algorithm_template#57, open).

Checks

  • uv run --group docs pytest -q docs/tests: 36 passed, including the check that the embedded prompt matches the static prompt.
  • npm test (prompt builder, Node 24): 9 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NJQdbHt5icm1CgFVHsHTNx

…progress logging

The prompt left preprocessing entirely to the algorithm and said nothing
about scale or progress. Curiosity then reimplemented tokenization by
hand, passed every fixture and demo gate, and on NWICU ran out of GPU
memory twice, needed 29 min per prediction time in generation and
logged nothing during a 26 h pretraining.

- Prefer MEDS-Transforms stages and meds-torch-data for standard steps
  when the source has no usable pipeline; keep algorithm-specific
  representations in the algorithm package and record the choice.
- Write expensive paths for full-data scale; project each step's
  full-data cost from a timed realistic slice before launching; the demo
  report includes it.
- Stream aggregate-only progress logs from long steps.

Both point to the template guide sections (MEDS_algorithm_template#56,
#57).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJQdbHt5icm1CgFVHsHTNx

This branch has not been deployed

No deployments
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.

1 participant