exp_name='exp_rafbart_6_finetune_epoch0'

save_path="/data2/mnskim/checkpoints/tbg1/ckpts/models/worldformer/${exp_name}"
#lr=1e-4
lr=3e-6
#mkdir -p $save_path

# Tokenizer
tokenizer_path='facebook/bart-base'
graph_encoder_tokenizer_path='facebook/bart-base'
action_decoder_tokenizer_path='facebook/bart-base'
graph_decoder_tokenizer_path='facebook/bart-base'

# new data
train_file='/data2/mnskim/data/tbg/JerichoWorld/datasets/v7/train.json'
test_file='/data2/mnskim/data/tbg/JerichoWorld/datasets/v7/test.json'

cache_path='/data2/mnskim/data/tbg/caches/datasets/rafbart_v2_fasttest'

n_epochs=10

pretrained_ckpt="/data2/mnskim/checkpoints/tbg1/ckpts/models/worldformer/exp_rafbart_6_pretrain/model_epoch0.pt"

CUDA_VISIBLE_DEVICES=6 python /home/mnskim/workspace/tbg/tbg1/worldformer2/training/train_rafbart_v2.py --train_file $train_file \
                                                                                       --test_file $test_file \
                                                                                       --cache_path $cache_path \
                                                                                       --save_path $save_path \
                                                                                       --n_epochs $n_epochs \
                                                                                       --train_batchsize 4 \
                                                                                       --val_batchsize 16 \
                                                                                       --test_batchsize 8 \
                                                                                       --n_accum 4 \
                                                                                       --mode 'train' \
                                                                                       --lr $lr \
                                                                                       --ckpt_policy 'all' \
                                                                                       --tokenizer_path $tokenizer_path \
                                                                                       --graph_encoder_tokenizer_path $tokenizer_path \
                                                                                       --action_decoder_tokenizer_path $tokenizer_path \
                                                                                       --graph_decoder_tokenizer_path $tokenizer_path \
                                                                                       --num_workers 8 \
                                                                                       --log_freq 32 \
                                                                                       --train_negative_mode 'sample' \
                                                                                       --val_negative_mode 'sample' \
                                                                                       --test_negative_mode 'sample' \
                                                                                       --use_state_vec \
                                                                                       --use_graph_vec \
                                                                                       --task_mode 'raf_multitask' \
                                                                                       --add_atomic_tokens \
                                                                                       --pretrained_ckpt $pretrained_ckpt \
                                                                                       --wandb_project 'tbg' \
                                                                                       --wandb_name $exp_name \
                                                                                       #--refresh_cache \
                                                                                       #--wandb_project 'tbg' \
                                                                                       #--wandb_name $exp_name \
                                                                                       #--refresh_cache \
                                                                                       #--dist-backend 'nccl' \
                                                                                       #--multiprocessing-distributed \
                                                                                       #--world-size 1 \
                                                                                       #--local_rank 0 \
                                                                                       #--dist-url 'tcp://127.0.0.1:3456' \
                                                                                       #--refresh_cache \
                                                                                       #--wandb_project 'tbg' \
                                                                                       #--wandb_name $exp_name \
                                                                                       #--init_mode 'graph'
                                                                                       #--add_ckg \
                                                                                       
