From e627c5b16f25e7f16d1be72c24ad0dece9a46973 Mon Sep 17 00:00:00 2001 From: "haowen.han@mthreads.com" Date: Mon, 13 May 2024 13:29:27 +0800 Subject: [PATCH] Revert "fix dataloaer for toolkit (#61867) (#61994)" This reverts commit b50e906d8b019d75d916b17485cef32831270a85. --- python/paddle/io/dataloader/dataloader_iter.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/paddle/io/dataloader/dataloader_iter.py b/python/paddle/io/dataloader/dataloader_iter.py index 84260dc90ca562..ed64f5da3d9e93 100644 --- a/python/paddle/io/dataloader/dataloader_iter.py +++ b/python/paddle/io/dataloader/dataloader_iter.py @@ -704,11 +704,10 @@ def _get_data(self): if len(failed_workers) > 0: self._exit_thread_unexpectedly() pids = ', '.join(str(w.pid) for w in failed_workers) - logging.warning( - "DataLoader {} workers exit unexpectedly, " - "pids: {}".format(len(failed_workers), pids) + raise RuntimeError( + f"DataLoader {len(failed_workers)} workers exit unexpectedly, " + f"pids: {pids}" ) - return # get(timeout) will call _poll(timeout) and may raise IOError if isinstance(e, (IOError, queue.Empty)):