#!/usr/bin/env bash set -euo pipefail : "${TARGET_ROOT:?Set TARGET_ROOT to EasyCom target_perframe files}" : "${POOLED_AV_RUN:?Set POOLED_AV_RUN to the aligned pooled-AV result directory}" : "${ORACLE_RUN:?Set ORACLE_RUN to the aligned aggregate-visible oracle result directory}" : "${MINIROAD_RUN:?Set MINIROAD_RUN to the converted MiniROAD result directory}" OUTPUT="${OUTPUT:-reports/easycom_floor_post_boundary_diagnostic/summary.json}" SESSIONS="${SESSIONS:-Session_3 Session_2 Session_1}" CALIBRATION_SESSIONS="${CALIBRATION_SESSIONS:-}" PYTHON_BIN="${PYTHON_BIN:-python}" read -r -a sessions <<<"${SESSIONS}" threshold_args=() if [[ -n "${CALIBRATION_SESSIONS}" ]]; then read -r -a calibration_sessions <<<"${CALIBRATION_SESSIONS}" threshold_args=(--calibration-sessions "${calibration_sessions[@]}") else echo "No calibration sessions supplied: marking this post-boundary run exploratory/in-sample." >&2 threshold_args=(--allow-in-sample-test-thresholds) fi "${PYTHON_BIN}" evaluate_floor_state_changes.py \ --target-root "${TARGET_ROOT}" \ --run "pooled_av=${POOLED_AV_RUN}" \ --run "oracle_aggregate_visible=${ORACLE_RUN}" \ --run "egospeak_miniroada=${MINIROAD_RUN}" \ --sessions "${sessions[@]}" \ "${threshold_args[@]}" \ --matched-recalls 0.7 0.8 0.9 \ --decision-timing post-boundary \ --midturn-pause-max-seconds 2.0 \ --print-event-timelines 3 \ --output "${OUTPUT}"