#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT_DIR" export PYTHONPATH="$ROOT_DIR/src:${PYTHONPATH:-}" CONDA_ENV="${CONDA_ENV:-ct}" CONFIG="${1:-configs/benchmark.yaml}" run_py() { conda run --no-capture-output -n "$CONDA_ENV" python "$@" } mkdir -p logs experiments/benchmark echo "[benchmark] tabular clinical_logistic" run_py -m liver_tace.tabular_benchmark --config "$CONFIG" --method clinical_logistic echo "[benchmark] tabular radiomics_svm" run_py -m liver_tace.tabular_benchmark --config "$CONFIG" --method radiomics_svm echo "[benchmark] tabular radiomics_clinical_rf" run_py -m liver_tace.tabular_benchmark --config "$CONFIG" --method radiomics_clinical_rf echo "[benchmark] deep CT-only resnet18" run_py -m liver_tace.deep_outcome_baseline --config configs/benchmark/resnet18_ct_only.yaml echo "[benchmark] deep CT-only densenet121" run_py -m liver_tace.deep_outcome_baseline --config configs/benchmark/densenet121_ct_only.yaml echo "[benchmark] SegResNet segmentation-only" run_py -m liver_tace.train --config configs/benchmark/waw_seg_only.yaml run_py -m liver_tace.evaluate \ --config configs/benchmark/waw_seg_only.yaml \ --checkpoint experiments/benchmark/segresnet_seg_only/checkpoints/best.pt \ --output-dir experiments/benchmark/segresnet_seg_only echo "[benchmark] current full multitask with clean clinical columns" run_py -m liver_tace.train --config configs/benchmark/full_multitask_clean.yaml run_py -m liver_tace.evaluate \ --config configs/benchmark/full_multitask_clean.yaml \ --checkpoint experiments/benchmark/full_multitask/checkpoints/best.pt \ --output-dir experiments/benchmark/full_multitask echo "[benchmark] VISTA3D/NV-Segment-CT external prediction evaluation" run_py -m liver_tace.external_segmentation_benchmark --config "$CONFIG" --method vista3d_external --split val || true echo "[benchmark] aggregate" run_py -m liver_tace.aggregate_benchmark --config "$CONFIG" --output-dir experiments/benchmark echo "[benchmark] done: experiments/benchmark/benchmark_summary.csv"