Restore Modal training entrypoint (CPU image + game-aware wandb)#12
Merged
Conversation
…roject PR #7 deleted modal_app.py (375 lines) and tests/test_modal_app.py (348 lines) entirely instead of editing them, breaking `modal run modal_app.py` and silently dropping #7's titled improvements. Restore the matched pair from before #7 and apply that intent: - CPU-only torch image via extra_index_url (sequential MCTS gets no GPU benefit; CPU wheels are far smaller/cheaper than the default CUDA build) - game-aware wandb project (`alphazero-<game>`) instead of hardcoded `alphazero-tictactoe`, with a regression test - generic Modal app name `alphazero` alphago-67y
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
modal_app.pyandtests/test_modal_app.pyare empty (0 bytes) in main — PR #7 ("Slim Modal image to CPU torch + game-aware wandb project") deleted both (375 + 348 lines) instead of editing them.modal run modal_app.pyis broken, and #7's titled improvements never shipped. This restores the matched pair from before #7 and applies that intent for real.Motivation
/tmpcopy to run at all.WANDB_PROJECT = "alphazero-tictactoe", which is why the Connect Four robustness runs landed in a tic-tac-toe project.alphago-geq).Changes
modal_app.py+tests/test_modal_app.pyfrom833d1fd~1(last known-good pair).extra_index_url=https://download.pytorch.org/whl/cpu— sequential MCTS gets no GPU benefit and CPU wheels are far smaller/cheaper.alphazero-<game>via_wandb_project_for_game, replacing the hardcoded tic-tac-toe project. Added a regression test.alphazero(it trains any game).Testing
pytest tests/test_modal_app.py→ 7 passed.alphazero, image constructs with the CPU index, project resolves toalphazero-connectfour.alphazero-tictactoe. wandb run: https://wandb.ai/cweill-self/alphazero-tictactoe/runs/1p4aa843Review focus
extra_index_url) vs. pinning+cpuwheels.alphazerois preferred over per-game app names.Fixes
alphago-67y. Related:alphago-0oz(wire batched MCTS into training self-play),alphago-geq(Modal CI smoke test).