-
Notifications
You must be signed in to change notification settings - Fork 0
/
englishtest.sh
executable file
·31 lines (25 loc) · 971 Bytes
/
englishtest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# script to run a pretrained huggingface model and eval on OffensEval 2020 English data
# Note: Set Config parameter in D4.cmd
source ~/anaconda3/etc/profile.d/conda.sh
conda activate /home2/davidyi6/ling-573/573_gpu
# Test whether condor is using GPU
python3 src/test_gpu.py
# Preprocess tweets
python3 src/preprocess_olid.py \
--file data/english_test.tsv \
--all_test \
--split_punctuation \
--remove_apostraphes \
--remove_hashtags \
--language english
# Run finetuned model predictions on English test data and generate output
python3 src/finetune_predict.py \
--val_data data/clean_all_test_english.tsv \
--config configs/finetune_xlmr_large_final.json \
--model_path models/finetune_xlmr_large_2_english \
--val_output_csv outputs/D4/primary/evaltest/D4_english.csv
# Evaluation script (English)
python3 src/eval.py \
--val_output_csv outputs/D4/primary/evaltest/D4_english.csv \
--output_path results/D4/primary/evaltest/D4_scores.out