File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def _expand_next_text_batch(self) -> int:
335335
336336 # Cleanup
337337 del batch_samples , batch_input_ids
338- gc . collect ()
338+ collect ()
339339
340340 return sequences_generated
341341
@@ -360,7 +360,7 @@ def __next__(self) -> tf.Tensor:
360360
361361 # Periodic cleanup
362362 if self .sequences_returned % 100 == 0 :
363- gc . collect ()
363+ collect ()
364364 print (f"Returned { self .sequences_returned } sequences" )
365365
366366 return tensor_sequence
@@ -463,7 +463,7 @@ def _expand_next_text_batch(self) -> int:
463463
464464 # Cleanup
465465 del batch_samples , batch_labels
466- gc . collect ()
466+ collect ()
467467
468468 return labels_generated
469469
@@ -488,7 +488,7 @@ def __next__(self) -> tf.Tensor:
488488
489489 # Periodic cleanup
490490 if self .labels_returned % 100 == 0 :
491- gc . collect ()
491+ collect ()
492492 print (f"Returned { self .labels_returned } labels" )
493493
494494 return tensor_label
You can’t perform that action at this time.
0 commit comments