fix: training pipeline bugs

- invalid integer cast
- "resuming" message when not resuming
This commit is contained in:
dogeystamp 2024-12-30 18:37:49 -05:00
parent 9a2a770afb
commit 174519bec5
No known key found for this signature in database
3 changed files with 3 additions and 1 deletions

1
nnue/.gitignore vendored
View File

@ -1,2 +1,3 @@
batches/
venv/
train_data/

View File

@ -219,6 +219,7 @@ async def main():
if skipped:
logging.info("Resuming at file '%s'.", file)
skipped = False
else:
logging.info("Reading file '%s'.", file)

View File

@ -397,7 +397,7 @@ pub fn eval_metrics(board: &Board) -> EvalMetrics {
let king_distance_eval =
-advantage * i32::try_from(king_distance).unwrap() * max(7 - phase, 0) / 100;
let eval = pst_eval + king_distance_eval;
let eval = (pst_eval + king_distance_eval).clamp(i16::MIN.into(), i16::MAX.into());
EvalMetrics {
pst_eval,