fix: training pipeline bugs
- invalid integer cast - "resuming" message when not resuming
This commit is contained in:
parent
9a2a770afb
commit
174519bec5
1
nnue/.gitignore
vendored
1
nnue/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
batches/
|
||||
venv/
|
||||
train_data/
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user