Repository navigation
Training loop: supported ONNX exporter, per-match openings, checks before a run starts - #6
Merged
Merged
Conversation
The TorchScript exporter (dynamo=False) is deprecated and warns that it will be removed, and requirements.txt put no upper bound on PyTorch, so a later upgrade would have stopped the loop at its first export. The export now uses the supported exporter at opset 18 and requires PyTorch 2.9 or newer. The graph keeps its contract (inputs spatial/global, outputs policy/value, any batch size). It is now verified against PyTorch at batch sizes 1 and 5 rather than 5 alone, so a graph whose batch dimension came out fixed is caught at export time. Measured on an 8-core laptop with the 6x64 network: the two exporters' graphs agree with PyTorch to 1.3e-6 and search at the same speed (13.6k-14.5k playouts/s with the old one, 13.7k with the new one). Tests pass on PyTorch 2.9.0 and 2.15.0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Evaluation: - The arena seed was len(tag). Match names such as gen-0005-vs-gen-0004 and gen-0005-vs-gnugo-l1 all have 20 characters, so every evaluation of a run replayed the same 20 random openings. The seed is now a CRC of the name: different for every match, the same when a run is resumed. Starting and resuming: - The loop checks that every anchor can play before it creates anything. Without GNU Go it used to fail at the first anchor match, after a full generation of self-play and training. - --set on an existing run was ignored silently. A value that would change the run's settings is now refused; repeating the run's own settings still resumes it. - A run stopped between saving the first checkpoint and exporting it could not start again: init returned as soon as the checkpoint existed. - gofer writes arena and self-play result files through a rename, since the loop takes their existence as proof that the work finished. - scripts/setup.sh installs GNU Go with dnf on Fedora. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- docs/training.md and the changelog cover the anchor check, per-match openings, --set on existing runs and the new exporter. - The Elo standard error treats the other ratings as exact. Say so where it is computed and where it is shown, rather than let it read as the error against generation 0. - KataGo does gate candidates (100 wins in 200 games, Wu 2020, appendix E); the training guide said it does not. - internal/nn/features.go pointed at a path that does not exist. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Fixes found while preparing a long training run on a new machine (Fedora, no GNU Go installed, PyTorch 2.15). None of them changes the training recipe: same network, same self-play settings, same losses.
What was wrong
requirements.txthad no upper bound on PyTorchtorch.export-based exporter (opset 18); require PyTorch 2.9+len(tag)gen-0005-vs-gen-0004,gen-0005-vs-gnugo-l1and so on all have 20 characters, so every evaluation of a run replayed the same 20 openings--seton an existing run was ignored silentlyinitreturned as soon as the first checkpoint existedgofer arena -jsonandgofer selfplay -statswrote their result in placeAlso:
scripts/setup.shinstalls GNU Go withdnfon Fedora, the docs say what the±beside an Elo rating means (the error against the opponents actually played, not against generation 0), and the training guide no longer says KataGo has no gating (it does: 100 wins in 200 games, Wu 2020, appendix E).Exporter check
spatial/global, outputspolicy/value, dynamic batch.gofer bench, 10 s runs on an 8-core laptop: 14.5k and 13.6k playouts/s with the old exporter's graph, 13.7k and 13.7k with the new one.Test plan
make lint,go test ./...with GNU Go onPATH,go test -race -short ./..., pure-Go and WebAssembly buildspytest training: 26 passed (5 new) on PyTorch 2.15.0, and on PyTorch 2.9.0 in a separate environmentchampion_min_elo, to exercise champions with the real engine: first champion at generation 1, an undecided match that promoted nothing, and two promotions on SPRT H1 (48–12 and 43–17); no release repository given, so nothing was published--setis refused; a run interrupted three times (during self-play and training) resumed and finished🤖 Generated with Claude Code