Skip to content

Commit

Permalink
fix: Disable dataloader shuffle for classification datamodule (#116)
Browse files Browse the repository at this point in the history
* fix: Disable dataloader shuffle for classification datamodule

* build: Update version, update changelog

* fix: Fix multilabel datamodule using train dataset inside validation
  • Loading branch information
lorenzomammana authored May 17, 2024
1 parent 5d5dbe6 commit 9dbd1bf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Changelog
All notable changes to this project will be documented in this file.

### [2.1.5]

#### Fixed

- Fix classification val_dataloader shuffling data when it shouldn't

### [2.1.4]

#### Updated
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "quadra"
version = "2.1.4"
version = "2.1.5"
description = "Deep Learning experiment orchestration library"
authors = [
"Federico Belotti <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion quadra/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.1.4"
__version__ = "2.1.5"


def get_version():
Expand Down
6 changes: 3 additions & 3 deletions quadra/datamodules/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def val_dataloader(self) -> DataLoader:
return DataLoader(
self.val_dataset,
batch_size=self.batch_size,
shuffle=True,
shuffle=False,
num_workers=self.num_workers,
drop_last=False,
pin_memory=True,
Expand Down Expand Up @@ -965,9 +965,9 @@ def val_dataloader(self) -> DataLoader:
if not self.val_dataset_available:
raise ValueError("Validation dataset is not initialized")
return DataLoader(
self.train_dataset,
self.val_dataset,
batch_size=self.batch_size,
shuffle=True,
shuffle=False,
num_workers=self.num_workers,
drop_last=False,
pin_memory=True,
Expand Down

0 comments on commit 9dbd1bf

Please sign in to comment.