#!/bin/bash

# Script to run CoreLogic timeseries experiments with different models

# Use BASE_PATH from environment or set default if not defined
BASE_PATH=${BASE_PATH:-"./"}
# Remove trailing slash if present
BASE_PATH=${BASE_PATH%/}

# Define the base directory for configs to make lines shorter
CONFIG_DIR="${BASE_PATH}/configs/experiment/timeseries/corelogic"

# List of experiments to run
experiments=(
    "cl_h3.yaml"
    "cl_hyena.yaml"
    "cl_lc.yaml"
    "cl_mha.yaml"
    "cl_s4.yaml"
    "cl_set-seq.yaml"
)

# Loop through each experiment and run the training command
for exp_file in "${experiments[@]}"
do
    echo "Running experiment: ${exp_file}"
    # Change directory to the project root before running the train script
    (cd "${BASE_PATH}" && python -m train experiment="timeseries/corelogic/${exp_file}")
    echo "Finished experiment: ${exp_file}"
    echo "---------------------------------"
done

echo "All experiments completed."
# chmod +x corelogic_set-seq_vs_other_models.sh
# ./corelogic_set-seq_vs_other_models.sh
