diff --git a/justfile b/justfile index 84064df..b43a4dc 100644 --- a/justfile +++ b/justfile @@ -93,7 +93,7 @@ clean: clean-build clean-pyc clean-test clean-docs # Examples # Preprocess example data. -example-preprocess OPTIONS: +example-preprocess OPTIONS="": batdetect2 preprocess \ --base-dir . \ --dataset-field datasets.train \ @@ -102,16 +102,9 @@ example-preprocess OPTIONS: example_data/datasets.yaml example_data/preprocessed # Train on example data. -example-train: +example-train OPTIONS="": batdetect2 train \ - --train-examples example_data/preprocessed \ - --train-config config.yaml \ - --train-config-field train \ - --preprocess-config config.yaml \ - --preprocess-config-field preprocessing \ - --target-config config.yaml \ - --target-config-field targets \ - --postprocess-config config.yaml \ - --postprocess-config-field postprocessing \ - --model-config config.yaml \ - --model-config-field model + --val-dir example_data/preprocessed \ + --config example_data/config.yaml \ + {{OPTIONS}} \ + example_data/preprocessed diff --git a/src/batdetect2/cli/__init__.py b/src/batdetect2/cli/__init__.py index 59ec0c0..3cef75e 100644 --- a/src/batdetect2/cli/__init__.py +++ b/src/batdetect2/cli/__init__.py @@ -2,13 +2,13 @@ from batdetect2.cli.base import cli from batdetect2.cli.compat import detect from batdetect2.cli.data import data from batdetect2.cli.preprocess import preprocess -from batdetect2.cli.train import train_detector +from batdetect2.cli.train import train_command __all__ = [ "cli", "detect", "data", - "train_detector", + "train_command", "preprocess", ] diff --git a/src/batdetect2/cli/train.py b/src/batdetect2/cli/train.py index e9bf4b4..823e7bb 100644 --- a/src/batdetect2/cli/train.py +++ b/src/batdetect2/cli/train.py @@ -18,7 +18,7 @@ __all__ = [ @cli.command(name="train") -@click.option("--train-dir", type=click.Path(exists=True), required=True) +@click.argument("train_dir", type=click.Path(exists=True)) @click.option("--val-dir", type=click.Path(exists=True)) @click.option("--model-path", type=click.Path(exists=True)) @click.option("--config", type=click.Path(exists=True))