Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
deependujha committed Sep 18, 2024
1 parent feb5d48 commit b5ec077
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/litdata/processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,11 @@ def run(self, data_recipe: DataRecipe) -> None:
# Exit early if all the workers are done.
# This means there were some kinda of errors.
if all(not w.is_alive() for w in self.workers):
raise RuntimeError("One of the worker has failed")
try:
error = self.error_queue.get(timeout=0.001)
self._exit_on_error(error)
except Empty:
break

if _TQDM_AVAILABLE:
pbar.close()
Expand Down

0 comments on commit b5ec077

Please sign in to comment.