This repository contains training data stats collection script for the Leela Chess Zero project.
- Python code is located in the
src/directory. - C++ code is located in the
csrc/directory.
The build system for C++ code is meson. During development, the project is built
in the builddir/.
- Build:
meson compile -C builddir/from build directory for debug build orjust buildfor release build (located inbuild/release). - Format code:
just format - We use Google C++ style guide.
- That means 80 columns.
- That means comments should be in full sentences with periods in the end.
- When conditional or loop fits one line, it must be written as one line
without braces, for example:
if (condition) return value; - Prefer
absltostd(e.g.absl::c_algorithms,absl::Mutex,absl::StrCat, etc.). Preferabsl::flat_hash_map(orabsl::btree_mapif we need ordered keys) tostd::unordered_maporstd::map.
- We use
uvfor Python package and venv management, and to running the application. - To test it, build using
just buildrunbuild/release/trainingdata-stats --input_tar=/home/crem/tmp/2025-11/training-run2-test91-20251108-1317.tar --run=t90
- NEVER add
# type: ignoreor other ways to mask/silence errors instead of fixing them. - Rely on protobuf default values. DO NOT write code like
config.has_foo() ? config.foo() : default_value;
- Documentation is in the
spec/directory.