Skip to content

Fix RE[W+] winner in training-data conversion - #1272

Open
22nsuk wants to merge 1 commit into
lightvector:masterfrom
22nsuk:codex/upstream-white-result
Open

22nsuk wants to merge 1 commit into
lightvector:masterfrom
22nsuk:codex/upstream-white-result

Conversation

@22nsuk

@22nsuk 22nsuk commented Oct 26, 2026

Copy link
Copy Markdown

writetrainingdata sets sgfGameWinner to Black for the valid unscored White-win result RE[W+]. This selects the Black-win branch when constructing forced result targets. Recognize White correctly while preserving the existing incomplete-record flags and target weighting.

Factor only the two bare B+/W+ branches into a file-local helper used by the converter and a native regression. The regression reads actual SGF RE properties, checks both colors plus lowercase/whitespace normalization, verifies the forced win/loss/no-result/score targets, and checks that other result forms are left to their existing handlers. It runs in katago runtests, so the existing upstream CI exercises it without a model or workflow changes.

Validation:

  • Negative control retaining the old W+ -> Black mapping: the new regression fails at winner == testCase.winner.
  • Fixed Eigen Release build: full katago runtests passes, including six accepted result variants and six non-bare-result controls.
  • Additional runoutputtests encountered the existing snapshot != NULL assertion at cpp/tests/testsearchnonn.cpp:2657. An unmodified export of base d91ea855 reproduced the same failure (first run passed, second failed). This is the separate terminal-leaf invariant issue covered by Fix visit-cap test invariants for terminal leaves #1258; this PR does not change those tests or claim an overall output-test pass.

Based directly on current upstream master (d91ea855110dae533f0aada947b2b7d78cc8a4e1), with one commit touching only writetrainingdata.cpp, runtests.cpp, and tests.h. This native regression checks result parsing and target construction, not a full SGF-to-NPZ conversion. No fork-specific worker settings, Python harnesses, or CI changes are included.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant