#!/bin/bash

cd ../..

# custom config
DATA=DATA/
TRAINER=MultiModalAdapter

DATASET=$1
SEED=$2
CFG=$3
SHOTS=16


DIR=output_MMA/base2new/train_base/${DATASET}/shots_${SHOTS}/${TRAINER}/seed${SEED}
if [ -d "$DIR" ]; then
    echo "Oops! The results exist at ${DIR} (so skip this job)"
else
    python MERGETUNE/mergetune/train.py \
    --root ${DATA} \
    --seed ${SEED} \
    --trainer ${TRAINER} \
    --dataset-config-file MERGETUNE/mergetune/configs/datasets/${DATASET}.yaml \
    --config-file MERGETUNE/mergetune/configs/trainers/${TRAINER}/${CFG}.yaml \
    --output-dir ${DIR} \
    DATASET.NUM_SHOTS ${SHOTS} \
    DATASET.SUBSAMPLE_CLASSES base
fi