Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Enforce dataloader params to have shuffle=True (#259)
### Description - **What**: It seems that in the `CAREamics` `TrainDataModule` the dataloader does not have shuffle set to `True`. - **Why**: Not shuffling the data during training can result in worse training, e.g. overfitting. - **How**: Allow users to explicitly pass shuffle=False with a warning, otherwise `{"shuffle": True}` is added to the param dictionary, if the dataset is not a subclass of `IterableDataset`.` ### Changes Made - **Modified**: `TrainDataModule.train_dataloader` ### Additional Notes and Examples See the discussion in #258 for details. --- **Please ensure your PR meets the following requirements:** - [x] Code builds and passes tests locally, including doctests - [x] New tests have been added (for bug fixes/features) - [x] Pre-commit passes - [ ] PR to the documentation exists (for bug fixes / features) --------- Co-authored-by: Joran Deschamps <[email protected]>
- Loading branch information