From 755ec602d77931f417618d082096735815616433 Mon Sep 17 00:00:00 2001 From: Dorian Koch <62394594+dorian-K@users.noreply.github.com> Date: Mon, 27 Jan 2025 11:14:55 +0100 Subject: [PATCH] LaplaceOrdering, fix when num_seqs multiple of bin size (#1681) --- returnn/datasets/postprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/returnn/datasets/postprocessing.py b/returnn/datasets/postprocessing.py index 738c87412..08cac3c55 100644 --- a/returnn/datasets/postprocessing.py +++ b/returnn/datasets/postprocessing.py @@ -364,11 +364,11 @@ def __call__(self, iterator: Iterator[TensorDict], **kwargs) -> Iterator[TensorD is_down_phase = False seq_buffer = list(islice(iterator, self.num_seqs_per_bin)) + has_ended = False while True: seq_buffer.sort(key=self._get_seq_len, reverse=is_down_phase) next_seq_buffer = [] - has_ended = False # Yield items to trainer while gradually pulling more data from PP function. # This optimizes CPU load when multiple workers are used.