#!/bin/bash

# Array of corruption types
corruptions=(
        # 'Gaussian Noise'
        # 'Shot Noise'
        # 'Impulse Noise'
        # 'Defocus Blur'
        # 'Glass Blur'
        # 'Motion Blur'
        # 'Zoom Blur'
        # 'Snow'
        # 'Frost'
        # 'Fog'
        # 'Brightness'
        # 'Contrast'
        # 'Elastic Transform'
        # 'Pixelate'
        # 'JPEG Compression'
        "stl"
        # "None"
)

# Base command parameters
name_base="test_cifar_c_cnn_gru_gn_width_128_act_0.5"
problem="cifar_c"
model="dt_net_2d_custom"
model_name="cnn_gru_gn_act"
num_class=10
epochs=150
alpha=0.0
beta=0.5
width=128
test_batch_size=128
test_iterations_high=60
# model_path="/home/fis/workspace_AI/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_self_verify/training-2025-04-23 16:03:27.591043"
# model_path="/home/fis/workspace_AI/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_self_verify/training-2025-04-28 08:29:26.958565"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_ligru_width_128/training-2025-04-30 12:52:43.507763"
# model_path="/home/fis/workspace_AI/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_ligru_width_128/training-2025-05-12 02:30:12.533116"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128/training-2025-04-21 23:50:27.992504"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_act_0.5/training-2025-04-22 23:46:12.000967"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_act_0.5/training-oozing-Takita"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_act_0.01/training-cadent-Tell"
model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_act_0.5/training-basest-Janetta"
# model_path="/mnt/storage/aird/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_cnn_gru_gn_width_128_act_0.0002/training-2025-04-22 16:34:59.028727"
# model_path="/home/fis/workspace_AI/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_resnet_cifar_width_128_depth_30/training-2025-05-10 13:35:36.797038"
# model_path="/home/fis/workspace_AI/AI-RnD/hieutb2/deep-thinking/outputs/cifar_c_resnet_cifar_width_128_depth_30_randomseed_2/training-2025-05-12 23:14:00.661106"

# Loop through each corruption and execute the command
for corruption in "${corruptions[@]}"; do
    echo "Running test for corruption: $corruption"
    python test_model.py \
        name=${name_base}_"${corruption}" \
        problem=${problem} \
        problem/model=${model} \
        problem.model.model=${model_name} \
        problem.model.num_class=${num_class} \
        problem.hyp.epochs=${epochs} \
        problem.hyp.alpha=${alpha} \
        problem.hyp.beta=${beta} \
        problem.model.test_iterations.high=${test_iterations_high} \
        problem.hyp.test_batch_size=${test_batch_size} \
        problem.hyp.noise_problem="${corruption}" \
        problem.test_data=hard \
        problem.model.width=${width} \
        problem.model.model_path="${model_path}"
    echo "Completed test for corruption: $corruption"
done

# Augmentation problem hyp
# 'Total Noise'
# 'Gaussian Noise'
# 'Shot Noise'
# 'Impulse Noise'
# 'Defocus Blur'
# 'Glass Blur'
# 'Motion Blur'
# 'Zoom Blur'
# 'Snow'
# 'Frost'
# 'Fog'
# 'Brightness'
# 'Contrast'
# 'Elastic'
# 'Pixelate'
# 'JPEG'
# 'Speckle Noise'
# 'Gaussian Blur'
# 'Spatter'
# 'Saturate'