Skip to content
Snippets Groups Projects
Commit 2491690c authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[tests.conftest] Prepare helpers for multi-class database support

parent 3c3acfd8
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
......@@ -162,10 +162,14 @@ class DatabaseCheckers:
assert len(split[k]) == lengths[k]
for s in split[k]:
assert any(
[s[0].startswith(k) for k in prefixes]
), f"Sample with name {s[0]} does not start with any of the prefixes in {prefixes}"
assert s[1] in possible_labels
assert any([s[0].startswith(k) for k in prefixes]), (
f"Sample with name {s[0]} does not start with any of the "
f"prefixes in {prefixes}"
)
if isinstance(s[1], list):
assert all([k in possible_labels for k in s[1]])
else:
assert s[1] in possible_labels
@staticmethod
def check_loaded_batch(
......
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