data_signature=wmt14_en_de
task=$1
mode=$2
root=/mnt/yardcephfs/mmyard/g_wxg_td_prc/chulunzhou/fairseq-master_v7
wfs_root=/mnt/wfs/mmcommwfssz/project_wx-mm-spr-nlp/users/chulunzhou

python $root/scripts/average_checkpoints.py \
       --inputs $wfs_root/checkpoints_v7/$data_signature/$task \
       --num-${mode}-checkpoints 5 \
       --output $wfs_root/checkpoints_v7/$data_signature/$task/checkpoint_avg.pt