50 lines
1.6 KiB
Python
50 lines
1.6 KiB
Python
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from reproducibility_blocks import print_payload, run_all_hypotheses
|
|
|
|
|
|
def parse_args() -> argparse.Namespace:
|
|
parser = argparse.ArgumentParser(description="Run all E01 reproducibility blocks.")
|
|
parser.add_argument("--data-root", type=Path, default=None, help="Absolute path to the original dataset `data`.")
|
|
parser.add_argument("--masks-root", type=Path, default=None, help="Absolute path to the masks dataset `data_masks`.")
|
|
parser.add_argument(
|
|
"--paths-config",
|
|
type=Path,
|
|
default=None,
|
|
help="Optional JSON config with `data_root` and `masks_root`.",
|
|
)
|
|
parser.add_argument(
|
|
"--force",
|
|
action="store_true",
|
|
help="Recompute all reproducibility blocks even if cached outputs already exist.",
|
|
)
|
|
parser.add_argument(
|
|
"--with-subject-figures",
|
|
action="store_true",
|
|
help="Render subject-oriented H1-H5 figures after the hypothesis blocks.",
|
|
)
|
|
parser.add_argument(
|
|
"--subject-figure-variants",
|
|
type=int,
|
|
default=5,
|
|
help="Number of candidate subject figures to render per hypothesis.",
|
|
)
|
|
return parser.parse_args()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
args = parse_args()
|
|
print_payload(
|
|
run_all_hypotheses(
|
|
data_root=args.data_root,
|
|
masks_root=args.masks_root,
|
|
config_path=args.paths_config,
|
|
force=args.force,
|
|
with_subject_figures=args.with_subject_figures,
|
|
subject_figure_variants=args.subject_figure_variants,
|
|
)
|
|
)
|