#!/bin/bash

# 初始化路径
CONFIG_BASE_DIR="projects/ovdino/configs/24ep/eval/sp_lora_FT"
CHECKPOINT_ROOT="../init"
EVAL_SCRIPT="scripts/eval_sp_lora_router.sh"
# ROUTER_MODE=("asar" "ddas" "none")
ROUTER_MODE=("asar")
router_threshold=(0.039)

DATASETS=("artaxor" "dior" "uodd")

for router in "${ROUTER_MODE[@]}"; do
    for threshold in "${router_threshold[@]}"; do
        DIR="../wkdrs/aa_final_result/ablation/sp_w${router}/threshold_${threshold}"
        
        for dataset in "${DATASETS[@]}"; do
            EVAL_CONFIG="projects/ovdino/configs/24ep/eval/sp_lora_FT/ovdino_swin_tiny224_bert_base_eval_${dataset}_router.py"

            ckpt_path="$CHECKPOINT_ROOT/model_awfdino_${dataset}.pth"
            
            echo "🔍 Evaluating $dataset with Router=$router threshold=$threshold"
            echo "Using checkpoint: $ckpt_path"

            bash "$EVAL_SCRIPT" $EVAL_CONFIG "$threshold" "$router" "$dataset" $ckpt_path "$DIR/eval_sp_lora_on_${dataset}_w${router}_thr${threshold}"
        done
    done
done
