Skip to content

Commit

Permalink
fix KeyError when delte idx from task_infos (#54498)
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate authored Jun 13, 2023
1 parent b5fe3f6 commit 38f38a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/io/dataloader/dataloader_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ def _get_data(self):
batch.reraise()

if idx == self._rcvd_idx:
del self._task_infos[idx]
if idx in self._task_infos:
del self._task_infos[idx]
self._structure_infos.append(structure)
return batch
else:
Expand Down

0 comments on commit 38f38a9

Please sign in to comment.