Skip to content

Commit f1eb602

Browse files
committed
fix: guarantee that data and labels are of equal size before training
1 parent 8adb5f0 commit f1eb602

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

models/node/processing/trainable/trainable_processing_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ def _is_training_condition_satisfied(self) -> bool:
247247
:rtype: bool
248248
"""
249249
return self._input_buffer[self.INPUT_DATA].get_data_count() >= self.training_set_size \
250-
and self._input_buffer[self.INPUT_LABEL].get_data_count() >= self.training_set_size
250+
and self._input_buffer[self.INPUT_LABEL].get_data_count() >= self.training_set_size \
251+
and self._input_buffer[self.INPUT_DATA].get_data_count() == self._input_buffer[self.INPUT_LABEL].get_data_count()
251252

252253
def _is_processing_condition_satisfied(self) -> bool:
253254
""" Returns whether the processing condition is satisfied. In this case it returns True if the input buffer

0 commit comments

Comments
 (0)