Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
copy file
%%bash
TASK="Sub-task A"
LANG="ENG"
MODEL="bert-base-cased"
tar -czvf "./${LANG}/${TASK}/output/${MODEL}.tar.gz" "./${LANG}/${TASK}/output/${MODEL}"/{*.tsv,*.json,events.*,model/config.json}
# Upload to bashupload
curl "https://bashupload.com/${LANG}_${TASK}_${MODEL}.tar.gz" --data-binary @"./${LANG}/${TASK}/output/${MODEL}.tar.gz"
%%bash
TASK="Sub-task B"
LANG="ENG"
MODEL="bert-base-cased"
mkdir -p "./${LANG}/${TASK}/${MODEL}"
mv "./${LANG}/${TASK}/output/"/* "./${LANG}/${TASK}/${MODEL}/"
mv "./${LANG}/${TASK}/${MODEL}" "./${LANG}/${TASK}/output/"
ls "./${LANG}/${TASK}/output/"
%%bash
TASK="Sub-task B"
LANG="ENG"
MODEL="bert-base-uncased"
python "${TRAC_PATH}"/src/run_experiment.py \
--data_dir "./${LANG}/${TASK}" \
--bert_model_type "${MODEL}" \
--task "${TASK}" \
--lang ${LANG} \
--output_dir "./${LANG}/${TASK}/output/${MODEL}" \
--cache_dir "./${LANG}/${TASK}" \
--num_train_epochs 5 \
--train_batch_size 32 \
--eval_batch_size 32 \
--save_steps 50 \
--logging_steps 5 \
--gradient_accumulation_steps 2 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment