#!/bin/bash

# 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 path to the Python script using BASE_PATH
PYTHON_SCRIPT="${BASE_PATH}/scripts/notebooks/equities/eval_equities.py"

# Define common arguments
COMMON_ARGS="--date 2025-05-07" # Assuming year 2025 based on previous context

# Check if the python script exists
if [ ! -f "$PYTHON_SCRIPT" ]; then
    echo "Error: Python script not found at $PYTHON_SCRIPT"
    exit 1
fi

echo "Starting evaluations..."
echo "====================="

# Run 1: long-conv
echo "Running: long-conv (YAML: equities/equities_lc)"
python "$PYTHON_SCRIPT" \
    --model_name long-conv \
    --experiment_yaml equities/equities_lc \
    $COMMON_ARGS
echo "Finished: long-conv"
echo "---------------------"

# Run 2: s4_simple
echo "Running: s4_simple (YAML: equities/equities_s4)"
python "$PYTHON_SCRIPT" \
    --model_name s4_simple \
    --experiment_yaml equities/equities_s4 \
    $COMMON_ARGS
echo "Finished: s4_simple"
echo "---------------------"

# Run 3: h3
echo "Running: h3 (YAML: equities/equities_h3)"
python "$PYTHON_SCRIPT" \
    --model_name h3 \
    --experiment_yaml equities/equities_h3 \
    $COMMON_ARGS
echo "Finished: h3"
echo "---------------------"

# Run 4: hyena
echo "Running: hyena (YAML: equities/equities_hyena)"
python "$PYTHON_SCRIPT" \
    --model_name hyena \
    --experiment_yaml equities/equities_hyena \
    $COMMON_ARGS
echo "Finished: hyena"
echo "---------------------"

echo "====================="
echo "All evaluations complete." 

# Run 5: MHA
echo "Running: hyena (YAML: equities/equities_hyena)"
python "$PYTHON_SCRIPT" \
    --model_name mha \
    --experiment_yaml equities/equities_mha \
    --date 2025-04-27
echo "Finished: hyena"
echo "---------------------"

echo "====================="
echo "All evaluations complete." 

# chmod +x run_evaluations.sh
# ./run_evaluations.sh