Skip to content

Commit

Permalink
handle index error for dataloader
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu committed Jun 7, 2022
1 parent ff81fa0 commit 0d2769d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ build/
log/
nohup.out
.DS_Store
.idea
5 changes: 5 additions & 0 deletions ppcls/static/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0d2769d

Please sign in to comment.