diff --git a/src/chess_pipeline.py b/src/chess_pipeline.py index e926fa1..2a4f1b1 100644 --- a/src/chess_pipeline.py +++ b/src/chess_pipeline.py @@ -320,15 +320,21 @@ def complete(self): counter = 0 position_count = len(no_evals['positions']) + evaluation = None for position in no_evals['positions'].tolist(): if position in positions_evaluated.values: # position will be dropped later if evaluation is None evaluation = None else: - evaluation = get_sf_evaluation(position + ' 0', - stockfish_params.location, - stockfish_params.depth) + sf_eval = get_sf_evaluation(position + ' 0', + stockfish_params.location, + stockfish_params.depth) + if sf_eval is not None: + # TODO: this is implicitly setting evaluation = last + # eval if in a checkmate position. handle this better + evaluation = sf_eval + local_evals.append(evaluation) # progress bar stuff