From 98ceb388154bdd33e69f311748e5df885d4ab1fe Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:09:35 +0000 Subject: [PATCH] modal: rename launch entrypoint main->fanout (collides with app.py::main) launch.py imports `app` from app.py, which registers app.py's @local_entrypoint `main`; launch.py defining its own `main` raised InvalidError(Duplicate local entrypoint). So launch.py had never actually run -- the earlier vanilla verify was via app.py directly. Invoke: modal run modal/launch.py::fanout [--only N]. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com> --- modal/README.md | 4 ++-- modal/launch.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modal/README.md b/modal/README.md index e5732e6..f2622d9 100644 --- a/modal/README.md +++ b/modal/README.md @@ -64,9 +64,9 @@ that costs ~5 min GPU per run; uploading the prebuilt ones is cheaper.) ## Verify one run, then fan out ```bash -modal run modal/launch.py --only 1 # canary: seed-42 vanilla, confirm clean v2 FINAL EVAL +modal run modal/launch.py::fanout --only 1 # canary: seed-42 vanilla, confirm clean v2 FINAL EVAL # compare its per_mode_deploy.json to the local-box artifact for the same args -modal run modal/launch.py # all 15 (5 arms x seeds 42/41/43) +modal run modal/launch.py::fanout # all 15 (5 arms x seeds 42/41/43) ``` ## Getting the outputs back diff --git a/modal/launch.py b/modal/launch.py index d661d5e..91e7b93 100644 --- a/modal/launch.py +++ b/modal/launch.py @@ -7,8 +7,8 @@ mounted src/ carries the current committed code). id 1 = the canary: seed-42 vanilla (needs only the shared teacher pool, no pairset/direction inputs). Fire it alone first, then fan out once it's green: - .venv/bin/modal run modal/launch.py --only 1 # canary -> clean v2 FINAL EVAL - .venv/bin/modal run modal/launch.py # all 15 + .venv/bin/modal run modal/launch.py::fanout --only 1 # canary -> clean v2 FINAL EVAL + .venv/bin/modal run modal/launch.py::fanout # all 15 Each container writes out/runs/_/per_mode_deploy.json to the Volume; this entrypoint pulls the full run dir + log back into out/runs/ locally. @@ -60,7 +60,7 @@ for _s in SEEDS: @app.local_entrypoint() -def main(only: str = ""): +def fanout(only: str = ""): # NOT `main`: app.py (imported above) already owns that entrypoint name ids = [int(x) for x in only.split(",")] if only else sorted(JOBS) print(f"[launch] spawning {len(ids)} jobs: {ids}")