Skip to content
Snippets Groups Projects
Commit ccc390cc authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

Fixed issue with check_database_split_loading

parent dc220169
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
...@@ -238,8 +238,8 @@ def check_database_split_loading( ...@@ -238,8 +238,8 @@ def check_database_split_loading(
"Checking if can load all samples in all subsets of this split..." "Checking if can load all samples in all subsets of this split..."
) )
errors = 0 errors = 0
for subset in database_split.keys(): for subset, samples in database_split.items():
samples = subset if not limit else subset[:limit] samples = samples if not limit else samples[:limit]
for pos, sample in enumerate(samples): for pos, sample in enumerate(samples):
try: try:
data, _ = loader.sample(sample) data, _ = loader.sample(sample)
......
...@@ -132,8 +132,6 @@ def test_loading(): ...@@ -132,8 +132,6 @@ def test_loading():
metadata = s[1] metadata = s[1]
assert isinstance(data, torch.Tensor) assert isinstance(data, torch.Tensor)
print(data.shape)
assert _check_size(data.shape) # Check size assert _check_size(data.shape) # Check size
assert ( assert (
...@@ -176,7 +174,7 @@ def test_check(): ...@@ -176,7 +174,7 @@ def test_check():
assert ( assert (
check_database_split_loading( check_database_split_loading(
database_split, raw_data_loader, limit=limit database_split.subsets, raw_data_loader, limit=limit
) )
== 0 == 0
) )
...@@ -191,7 +189,7 @@ def test_check(): ...@@ -191,7 +189,7 @@ def test_check():
assert ( assert (
check_database_split_loading( check_database_split_loading(
database_split, raw_data_loader, limit=limit database_split.subsets, raw_data_loader, limit=limit
) )
== 0 == 0
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment