Skip to content

Commit eb2ec24

Browse files
committed
Remove NoneType in results preprocessing
1 parent 32434d5 commit eb2ec24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/load_data_sets.py

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def get_batch(self, batch_size):
8888
@staticmethod
8989
def from_positions_w_context(positions_w_context, is_test=False, extract_move_prob=False):
9090
positions, next_moves, results = zip(*positions_w_context)
91+
92+
# Remove None types to prevent error in wrt_result
93+
results = [i for i in results if i.result is not None]
94+
9195
extracted_features = bulk_extract_features(positions)
9296
if extract_move_prob:
9397
encoded_moves = np.asarray(next_moves)

0 commit comments

Comments
 (0)