Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: non-deterministic CI test failure #390

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ clean:
rm -rf ./src/*.egg-info
rm -rf ./build
rm -rf ./dist

install:
pip install -r requirements.txt
pip install -r requirements/test.txt
pip install -r requirements/docs.txt
pip install -r requirements/extras.txt
pip install -e .
11 changes: 8 additions & 3 deletions src/litdata/processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,10 +1135,15 @@ def run(self, data_recipe: DataRecipe) -> None:
json.dump({"progress": str(100 * current_total * num_nodes / total_num_items) + "%"}, f)

# Exit early if all the workers are done.
# This means there were some kinda of errors.
# TODO: Check whether this is still required.
# This means either there were some kinda of errors, or optimize function was very small.
if all(not w.is_alive() for w in self.workers):
raise RuntimeError("One of the worker has failed")
for w in self.workers:
if w.exitcode != 0:
try:
error = self.error_queue.get(timeout=0.01)
self._exit_on_error(error)
except Empty:
continue
Borda marked this conversation as resolved.
Show resolved Hide resolved

if _TQDM_AVAILABLE:
pbar.close()
Expand Down
Loading