Skip to content
Snippets Groups Projects
Commit 01e6d0b4 authored by Maxime DELITROZ's avatar Maxime DELITROZ Committed by André Anjos
Browse files

updated tests for Montgomery dataset

parent 5e6d38bc
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
...@@ -15,7 +15,7 @@ def test_protocol_consistency(): ...@@ -15,7 +15,7 @@ def test_protocol_consistency():
datamodule = importlib.import_module( datamodule = importlib.import_module(
"ptbench.data.montgomery.default" "ptbench.data.montgomery.default"
).datamodule ).datamodule
subset = datamodule.dataset_split.subsets subset = datamodule.database_split.subsets
assert len(subset) == 3 assert len(subset) == 3
...@@ -126,7 +126,7 @@ def test_loading(): ...@@ -126,7 +126,7 @@ def test_loading():
assert isinstance(data, torch.Tensor) assert isinstance(data, torch.Tensor)
assert data.size in ( assert data.size() in (
(1, 4020, 4892), # portrait (1, 4020, 4892), # portrait
(1, 4892, 4020), # landscape (1, 4892, 4020), # landscape
(1, 512, 512), # test database @ CI (1, 512, 512), # test database @ CI
...@@ -143,7 +143,7 @@ def test_loading(): ...@@ -143,7 +143,7 @@ def test_loading():
datamodule = importlib.import_module( datamodule = importlib.import_module(
"ptbench.data.montgomery.default" "ptbench.data.montgomery.default"
).datamodule ).datamodule
subset = datamodule.database_split.subsetss subset = datamodule.database_split.subsets
raw_data_loader = datamodule.raw_data_loader raw_data_loader = datamodule.raw_data_loader
# Need to use private function so we can limit the number of samples to use # Need to use private function so we can limit the number of samples to use
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment