Skip to content
Snippets Groups Projects

Making use of LightningDataModule and simplification of data loading

Merged Daniel CARRON requested to merge add-datamodule into main
Compare and Show latest version
4 files
+ 149
129
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -95,17 +95,17 @@ def list():
@datamodule.command(
epilog="""Examples:
1. Check if all files of the Montgomery dataset can be loaded:
1. Check if all files from the fold_0 of the Montgomery database can be loaded:
.. code:: sh
ptbench dataset check -vv shenzhen
ptbench datamodule check -vv montgomery_f0
2. Check if all files of multiple installed datasets can be loaded:
2. Check if all files of multiple installed protocols can be loaded:
.. code:: sh
ptbench dataset check -vv montgomery shenzhen
ptbench datamodule check -vv montgomery shenzhen
""",
)
@@ -116,7 +116,7 @@ def list():
@click.option(
"--limit",
"-l",
help="Limit check to the first N samples in each dataset, making the "
help="Limit check to the first N samples in each datamodule, making the "
"check sensibly faster. Set it to zero to check everything.",
required=True,
type=click.IntRange(0),
@@ -129,6 +129,7 @@ def check(protocols, limit):
errors = 0
for protocol in protocols:
logger.info(f"Checking {protocol}")
try:
module = importlib.metadata.entry_points(group="ptbench.config")[
protocol
Loading