handle index error for dataloader

pull/1988/head
liuyuang 2022-06-07 11:26:15 +08:00
parent ff81fa0179
commit 0d2769d2d4
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ build/
log/
nohup.out
.DS_Store
.idea

View File

@ -371,6 +371,11 @@ def run(dataloader,
"Except RuntimeError when reading data from dataloader, try to read once again..."
)
continue
except IndexError:
logger.warning(
"Except IndexError when reading data from dataloader, try to read once again..."
)
continue
idx += 1
# ignore the warmup iters
if idx == 5: