未验证 提交 38f38a91 编写于 作者: H HydrogenSulfate 提交者: GitHub

fix KeyError when delte idx from task_infos (#54498)

上级 b5fe3f63
...@@ -752,7 +752,8 @@ class _DataLoaderIterMultiProcess(_DataLoaderIterBase): ...@@ -752,7 +752,8 @@ class _DataLoaderIterMultiProcess(_DataLoaderIterBase):
batch.reraise() batch.reraise()
if idx == self._rcvd_idx: 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) self._structure_infos.append(structure)
return batch return batch
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册