set -e

export WANDB_PROJECT='inheritance_new'
export WANDB_MODE=online
export CUDA_VISIBLE_DEVICES=0
export TORCHINDUCTOR_FX_GRAPH_CACHE=1

for seed in 43; do
    # for task in \
    #     addition/reverse_add \
    # ; do
    #     WANDB_RUN_GROUP=$task-qwen-15 python run.py \
    #         --args experiments/inheritance/common/data.yaml experiments/inheritance/$task.yaml experiments/inheritance/common/Qwen_1.5B.yaml \
    #         --train_args experiments/inheritance/common/train_args_base.yaml \
    #         --seed=$seed \
    #         --max_steps=3000 \
    #         --learning_rate=5e-5 \
    #         --lr_scheduler_kwargs='{"num_decay_steps": 1000}' \
    #         --per_device_train_batch_size=128 \
    #         --per_device_eval_batch_size=256 \
    #         --gradient_accumulation_steps=1 \
    #         --num_eval=256 \
    #         --use_iterable_dataset=True \
    #         --train_data.A.kwargs.la=[1,9]
    # done

    # for task in \
    #     copy/copy_MQAR \
    #     copy/copy_reverse \
    #     copy/copy_capitalize_reverse \
    #     copy/copy \
    # ; do
    #     WANDB_RUN_GROUP=$task-qwen-15 python run.py \
    #         --args experiments/inheritance/common/data.yaml experiments/inheritance/$task.yamlexperiments/inheritance/common/Qwen_1.5B.yaml \
    #         --train_args experiments/inheritance/common/train_args_base.yaml \
    #         --seed=$seed \
    #         --max_steps=1000 \
    #         --learning_rate=5e-5 \
    #         --lr_scheduler_kwargs='{"num_stable_steps": 700, "num_decay_steps": 200}' \
    #         --per_device_train_batch_size=128 \
    #         --per_device_eval_batch_size=256 \
    #         --gradient_accumulation_steps=1 \
    #         --num_eval=256 \
    #         --eval_steps=500 \
    #         --train_data.A.kwargs.la=[1,9] \
    #         --train_data.A.kwargs.lb=[1,9]
    # done

    # for mult_len in 9 13 17 5; do
    # for task in \
    #     mult/reverse_mult_reverse_add \
    # ; do
    #     WANDB_RUN_GROUP=$task-qwen-15 python run.py \
    #         --args experiments/inheritance/common/data.yaml experiments/inheritance/$task.yaml experiments/inheritance/common/Qwen_1.5B.yaml \
    #         --train_args experiments/inheritance/common/train_args_base.yaml \
    #         --seed=$seed \
    #         --max_steps=5000 \
    #         --learning_rate=5e-5 \
    #         --lr_scheduler_kwargs='{"num_decay_steps": 1000}' \
    #         --per_device_train_batch_size=64 \
    #         --per_device_eval_batch_size=256 \
    #         --gradient_accumulation_steps=1 \
    #         --num_eval=256 \
    #         --eval_steps=0.25 \
    #         --use_iterable_dataset=True \
    #         --train_data.B.kwargs.la=[2,$mult_len] \
    #         --train_data.B.kwargs.lb=[2,$mult_len]
    # done
    # done

    # for task in \
    #     maze/maze \
    #     maze/maze_dfs \
    # ; do
    #     WANDB_RUN_GROUP=$task-qwen-15 python run.py \
    #         --args experiments/inheritance/common/data.yaml experiments/inheritance/$task.yaml experiments/inheritance/common/Qwen_1.5B.yaml \
    #         --train_args experiments/inheritance/common/train_args_base.yaml \
    #         --seed=$seed \
    #         --max_steps=5000 \
    #         --learning_rate=5e-5 \
    #         --lr_scheduler_kwargs='{"num_decay_steps": 1000}' \
    #         --per_device_train_batch_size=32 \
    #         --per_device_eval_batch_size=256 \
    #         --gradient_accumulation_steps=2 \
    #         --num_eval=256 \
    #         --eval_steps=0.25 \
    #         --use_iterable_dataset=True
    # done
done
