Skip to content

Commit f7d8b3e

Browse files
committed
Merge branch 'main' of github.com:SFI-Visual-Intelligence/Collaborative-Coding-Exam into mag-branch
2 parents 084dee2 + cb99d04 commit f7d8b3e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CollaborativeCoding/dataloaders/download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def already_downloaded(path):
130130
url_test, _, test_md5 = USPS_SOURCE["test"]
131131

132132
# Using temporary directory ensures temporary files are deleted after use
133-
with TemporaryDirectory() as tmp_dir:
133+
with TemporaryDirectory(dir=data_dir) as tmp_dir:
134134
train_path = Path(tmp_dir) / "train"
135135
test_path = Path(tmp_dir) / "test"
136136

tests/test_dataloaders.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
],
2626
)
2727
def test_load_data(data_name, expected):
28+
data_dir = Path("Data")
29+
data_dir.mkdir(exist_ok=True)
30+
2831
dataset, _, _ = load_data(
2932
data_name,
3033
train=False,
31-
data_dir=Path("Data"),
34+
data_dir=data_dir,
3235
transform=transforms.ToTensor(),
3336
)
3437

0 commit comments

Comments
 (0)