Skip to content

Fix PosWriter off-by-one so each output file holds at most maxPosesPerOutFile positions - #1243

Open
dtran24 wants to merge 1 commit into
lightvector:masterfrom
dtran24:dtran/fix-poswriter-off-by-one
Open

Fix PosWriter off-by-one so each output file holds at most maxPosesPerOutFile positions#1243
dtran24 wants to merge 1 commit into
lightvector:masterfrom
dtran24:dtran/fix-poswriter-off-by-one

Conversation

@dtran24

@dtran24 dtran24 commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Fixes an off-by-one error. For example, previously, a file configured with maxPosesPerOutFile = 100000 could contain 100,001 positions. By changing > to >=, this ensures a new file is opened once the configured limit is reached

Testing

Tested locally with a limit of 1 and 3 records:

  • Before: one file contained 2 records, another file contained 1 record
  • After: each file contained 1 record

First PR! Wanted to keep it small. Came across the repo recently, and became interested because of things like its distributed self-play approach, recent switch to transformers, and sharing of model internals studies https://github.com/lightvector/katagostudies

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