Skip loop iteration if train_queue is empty

Added a check to continue the loop if the training queue is empty.
This commit is contained in:
Thinh Nguyen
2026-01-03 23:32:38 +01:00
committed by GitHub
parent b9a4918d61
commit 0fcfd933ea

View File

@@ -227,6 +227,10 @@ class IFreqaiModel(ABC):
"""
while not self._stop_event.is_set():
time.sleep(1)
if not self.train_queue:
continue
pair = self.train_queue[0]
# ensure pair is available in dp