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>
This commit is contained in:
wassname
2026-06-06 14:09:35 +00:00
parent 6567f6c60a
commit 98ceb38815
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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/<ts>_<tag>/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}")