Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/mwalmsley/galaxy-datasets in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
mwalmsley committed Feb 25, 2024
2 parents ccebc76 + 7031fbf commit d9f9146
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions galaxy_datasets/pytorch/galaxy_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ def __init__(
self.val_fraction = val_fraction
self.test_fraction = test_fraction

self.prefetch_factor = prefetch_factor
self.dataloader_timeout = 600 # seconds aka 10 mins
if self.num_workers == 0:
logging.warning('num_workers=0, setting prefetch=None and timeout=0 as no multiprocessing')
self.prefetch_factor = None
self.dataloader_timeout = 0
else:
self.prefetch_factor = prefetch_factor
self.dataloader_timeout = 600 # seconds aka 10 mins

logging.info('Num workers: {}'.format(self.num_workers))
logging.info('Prefetch factor: {}'.format(self.prefetch_factor))
Expand Down

0 comments on commit d9f9146

Please sign in to comment.