This commit is contained in:
2026-04-06 18:41:16 +10:00
parent 3a7309b2cf
commit 1ef300d25e
6 changed files with 52 additions and 24 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
if [[ $# -lt 1 ]]; then
cat <<'EOF'
Usage:
scripts/rainml_py.sh <script_or_module> [args...]
Examples:
scripts/rainml_py.sh scripts/train_rain_model.py --site home --horizon-hours 4 ...
scripts/rainml_py.sh scripts/predict_rain_model.py --site home --model-name rain_next_4h --horizon-hours 4
Optional:
RAINML_PY_BUILD=1 scripts/rainml_py.sh ...
(builds the rainml image before running)
EOF
exit 1
fi
if [[ "${RAINML_PY_BUILD:-0}" == "1" ]]; then
docker compose build rainml
fi
docker compose run --rm --no-deps --entrypoint python3 rainml "$@"
+3 -3
View File
@@ -22,7 +22,7 @@ if [[ -z "${DATABASE_URL:-}" ]]; then
fi
echo "Running rain data audit..."
python scripts/audit_rain_data.py \
python3 scripts/audit_rain_data.py \
--site "$SITE" \
--start "$START" \
--end "$END" \
@@ -32,7 +32,7 @@ python scripts/audit_rain_data.py \
--out "$AUDIT_PATH"
echo "Training baseline rain model..."
python scripts/train_rain_model.py \
python3 scripts/train_rain_model.py \
--site "$SITE" \
--start "$START" \
--end "$END" \
@@ -51,7 +51,7 @@ python scripts/train_rain_model.py \
--dataset-out "$DATASET_PATH"
echo "Writing current prediction..."
python scripts/predict_rain_model.py \
python3 scripts/predict_rain_model.py \
--site "$SITE" \
--model-path "$MODEL_PATH" \
--model-name "$MODEL_NAME" \