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

[common.database] Hotfix for database check command

parent 7e66943c
No related branches found
No related tags found
1 merge request!46Create common library
...@@ -75,10 +75,16 @@ def check(entry_point_group, fold, limit): # numpydoc ignore=PR01 ...@@ -75,10 +75,16 @@ def check(entry_point_group, fold, limit): # numpydoc ignore=PR01
for i, batch in enumerate(loader): for i, batch in enumerate(loader):
if loader_limit == 0: if loader_limit == 0:
break break
logger.info( if isinstance(batch[0], dict):
f"{batch[1]['name'][0]}: " logger.info(
f"{[s for s in batch[0][0].shape]}@{batch[0][0].dtype}", f"{batch[1]['name'][0]}: "
) f"{[s for s in batch[0]['image'][0].shape]}@{batch[0]['image'][0].dtype}",
)
else:
logger.info(
f"{batch[1]['name'][0]}: "
f"{[s for s in batch[0][0].shape]}@{batch[0][0].dtype}",
)
loader_limit -= 1 loader_limit -= 1
except Exception: except Exception:
logger.exception(f"Unable to load batch {i} in dataset {k}") logger.exception(f"Unable to load batch {i} in dataset {k}")
......
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