Skip to content

Commit

Permalink
Avoid calling __getitems__ in DistributedDataLoaderIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
mdw771 committed Apr 18, 2024
1 parent 51a0f10 commit 1e8828b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generic_trainer/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def __next__(self):
self.i_sample += self.batch_size
self.i_batch += 1
try:
raise AttributeError('__getitems__ suffers from a performance bottleneck (reason unclear) on some HPCs. '
'Until a fix is found, calling __getitems__ should be avoided.')
data = self.dataset.__getitems__(inds)
except AttributeError:
raw_data = [self.dataset[i] for i in inds]
Expand Down

0 comments on commit 1e8828b

Please sign in to comment.