feat: Modal recipe (Wave 3 opening, ML) - #9
Merged
Merged
Conversation
Tier-1 recipe for Modal serverless compute, opening Wave 3 of the platform recipe program. Documents the local-wrap pattern: DING runs on the user's laptop wrapping `modal run`, ingesting JSON events streamed back from the remote function. Modal's container architecture forces this pattern (the runtime owns the container entrypoint, so `ding run --` can't wrap inside the container the way it does in K8s/Argo/Ray). Recipe-only: no Go code, no runctx auto-detection. Tier-2 candidate flagged: ding-modal Python helper for auto-emitting Modal task metadata (parallel to ding-ray candidate). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/recipes/modal.mdshowing how DING wrapsmodal runlocally, ingesting JSON events streamed back from the remote function. Modal's container architecture forces this local-wrap pattern (the Modal runtime owns the container entrypoint, soding run --can't wrap inside the container).Tier verdict
Tier 1 with Tier-2 candidate flagged:
pip install ding-modalPython helper providing a decorator that auto-emits Modal task metadata (parallel to theding-rayTier-2 candidate from Wave 2).Test plan
```bash
pip install modal
modal token new # one-time
mkdir /tmp/modal-smoke && cd /tmp/modal-smoke
Author app.py + ding.yaml from the recipe; trainer() prints val_loss=12.4 then sys.exit(1)
export SLACK_WEBHOOK_URL=...ding run --config ding.yaml -- modal run app.py::trainer
Verify:
1. loss_spike Slack alert (val_loss > 10) mid-execution
2. training_failed Slack alert with exit 1
3. modal_task_id label matches the Modal dashboard's task ID
```🤖 Generated with Claude Code