Skip to content

Commit

Permalink
fix dataloaer for toolkit (PaddlePaddle#61867) (PaddlePaddle#61994)
Browse files Browse the repository at this point in the history
  • Loading branch information
KB-Ding authored Feb 23, 2024
1 parent 04ac1c0 commit b50e906
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/paddle/io/dataloader/dataloader_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,11 @@ def _get_data(self):
if len(failed_workers) > 0:
self._exit_thread_unexpectedly()
pids = ', '.join(str(w.pid) for w in failed_workers)
raise RuntimeError(
f"DataLoader {len(failed_workers)} workers exit unexpectedly, "
f"pids: {pids}"
logging.warning(
"DataLoader {} workers exit unexpectedly, "
"pids: {}".format(len(failed_workers), pids)
)
return

# get(timeout) will call _poll(timeout) and may raise IOError
if isinstance(e, (IOError, queue.Empty)):
Expand Down

0 comments on commit b50e906

Please sign in to comment.