From 68ede74002f0bc997775a8e5842588f29a9563c6 Mon Sep 17 00:00:00 2001 From: bghira Date: Tue, 19 Sep 2023 20:18:52 -0700 Subject: [PATCH] (#159) when we exhaust the only remaining bucket, we should return None so that the epoch completes --- helpers/multiaspect/sampler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/multiaspect/sampler.py b/helpers/multiaspect/sampler.py index cb5b8cb9..0e8d2df5 100644 --- a/helpers/multiaspect/sampler.py +++ b/helpers/multiaspect/sampler.py @@ -399,6 +399,7 @@ def __iter__(self): f"Our only bucket {self.current_bucket} is exhausted, so we reset." ) self._reset_buckets() + return if all_buckets_exhausted: # If all buckets are exhausted, reset the seen images and refresh buckets