Skip to content

Commit

Permalink
Merge pull request #322 from sef43/zero_workers
Browse files Browse the repository at this point in the history
Disable persistent_workers with num_workers=0 and disable pin_memory in DataModule
  • Loading branch information
RaulPPelaez committed May 16, 2024
2 parents 75c462a + fe3036a commit d8813f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchmdnet/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def _get_dataloader(self, dataset, stage, store_dataloader=True):
dataset=dataset,
batch_size=batch_size,
num_workers=self.hparams["num_workers"],
persistent_workers=True,
pin_memory=True,
persistent_workers=True if self.hparams["num_workers"] > 0 else False,
pin_memory=False,
shuffle=shuffle,
)

Expand Down

0 comments on commit d8813f5

Please sign in to comment.