Skip to content

Commit

Permalink
fix division by zero error
Browse files Browse the repository at this point in the history
  • Loading branch information
denniswittich committed Feb 1, 2024
1 parent fffd8ba commit 23e738a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions learning_loop_node/data_exchanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ async def _download_images_data(self, organization: str, project: str, image_ids
num_image_ids = len(image_ids)
self.jepeg_check_info()
images_data = []
if num_image_ids == 0:
logging.info('got empty list. No images were downloaded')
return images_data
starttime = time.time()
progress_factor = 0.5 / num_image_ids # 50% of progress is for downloading data
for i in tqdm(range(0, num_image_ids, chunk_size), position=0, leave=True):
Expand Down

0 comments on commit 23e738a

Please sign in to comment.