#!/bin/bash

#SBATCH --job-name=CTF_SW_practical_forward_fill
#SBATCH --nodes=1
#SBATCH --gres=gpu:1
#SBATCH --time=0-12:00:00
#SBATCH --mem=10G
#SBATCH --cpus-per-task=4
#SBATCH --partition=P2
#SBATCH --output=/home/s2/hyungjinpark/Practical_baseline/log/CTF/S-%x.%j.out

eval "$(conda shell.bash hook)"

export CUDA_VISIBLE_DEVICES=0

model_name=ChannelTokenFormer
des='ChannelTokenFormer-M'
dataset='Monash_SolarWind_practical_train_forward_fill_test_forward_fill'


batch_size=(32)
pred_len=(288 576 864 1152)
seq_len=(576)
num_heads=(8)
learning_rate=(0.0001)
d_model=(256)
d_ff_ratio=(4)
e_layers=(2)
missing_ratio=(0)
seed=(2021 2022 2023 2024 2025)

for rs in "${seed[@]}"; do
    for mr in "${missing_ratio[@]}"; do
        for bs in "${batch_size[@]}"; do
            for pl in "${pred_len[@]}"; do
                for sl in "${seq_len[@]}"; do
                    for nh in "${num_heads[@]}"; do
                        for lr in "${learning_rate[@]}"; do
                            for dm in "${d_model[@]}"; do
                                for dfr in "${d_ff_ratio[@]}"; do
                                    for el in "${e_layers[@]}"; do

                                        echo "================================================"
                                        echo "batch_size: $bs"
                                        echo "d_model: $dm"
                                        echo "d_ff: $(($dm * $dfr))"
                                        echo "num_heads: $nh"
                                        echo "seq_len: $sl"
                                        echo "pred_len: $pl"
                                        echo "learning_rate: $lr"
                                        echo "model_name: $model_name"
                                        echo "seed: $rs"
                                        echo "================================================"

                                        python -u /home/s2/hyungjinpark/Practical_baseline/run.py \
                                        --task_name long_term_forecast \
                                        --is_training 1 \
                                        --root_path /shared/s2/lab01/timeSeries/forecasting/base/weather/ \
                                        --data_path $dataset.csv \
                                        --model_id $dataset'_'$sl'_'$pl \
                                        --model $model_name \
                                        --data $dataset \
                                        --features M \
                                        --seq_len $sl \
                                        --label_len 48 \
                                        --pred_len $pl \
                                        --e_layers $el \
                                        --d_layers 1 \
                                        --factor 3 \
                                        --enc_in 2 \
                                        --dec_in 2 \
                                        --c_out 2 \
                                        --des $des \
                                        --d_model $dm \
                                        --d_ff $(($dm * $dfr)) \
                                        --n_heads $nh \
                                        --learning_rate $lr \
                                        --attention_map 0 \
                                        --batch_size $bs \
                                        --patch_lens 18 48 \
                                        --sampling_rates 1 0.25 \
                                        --num_global_tokens 2 \
                                        --ind_glb 1 \
                                        --self_temp 1 \
                                        --use_norm 1 \
                                        --keep_prob 0.6 \
                                        --drop_rate 0 \
                                        --drop_path 0 \
                                        --missing_ratio $mr \
                                        --fix_seed $rs \
                                        --ckpt_dir $'Final_ff'/'ChannelTokenFormer_CI_0.6'/'SW_'$sl'_'$pl/ \
                                        --itr 1
                                    done
                                done
                            done
                        done
                    done
                done
            done
        done
    done
done