Skip to content

feat: Modal recipe (Wave 3 opening, ML) - #9

Merged
zuchka merged 1 commit into
mainfrom
add-modal-recipe
May 7, 2026
Merged

zuchka merged 1 commit into
mainfrom
add-modal-recipe

Conversation

@zuchka

@zuchka zuchka commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Opens Wave 3 of the platform recipe program (Wave 2 closed with v0.8.0 / Ray).
  • Adds a Tier-1 recipe at docs/recipes/modal.md showing how DING wraps modal run locally, 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, so ding run -- can't wrap inside the container).
  • No Go changes. runctx is unchanged. Recipe-only PR.
  • Modal lands in the existing ML category alongside MLflow + Ray. README runner table is NOT modified — Modal isn't auto-detected.

Tier verdict

Tier 1 with Tier-2 candidate flagged: pip install ding-modal Python helper providing a decorator that auto-emits Modal task metadata (parallel to the ding-ray Tier-2 candidate from Wave 2).

Test plan

  • Smoke gate (HARD — recipe is NOT shipped until this passes):
    ```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

    ```
  • mkdocs build --strict (CI runs it; not run locally — mkdocs isn't installed)

🤖 Generated with Claude Code

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>
@zuchka
zuchka merged commit 9106484 into main May 7, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant