#!/usr/bin/env bash # Run a command, saving log + runtime to logs/runs/_/ and appending one row to logs/index.csv # (details: ml_porosity/runlog.py). Examples: # scripts/runlog.sh scripts/15_diag_train.py --rids 900 901 --device cuda:1 # .py files are run with $PY # scripts/runlog.sh -n h1_rerun --note "re-run after fixing X" -- scripts/12_h1_blur.py --device cuda:1 # scripts/runlog.sh ls # most recent runs ROOT="$(cd "$(dirname "$0")/.." && pwd)" exec "${PY:-$ROOT/.venv/bin/python}" -m ml_porosity.runlog "$@"