-
Notifications
You must be signed in to change notification settings - Fork 0
/
D3_run.sh
executable file
·37 lines (31 loc) · 1.05 KB
/
D3_run.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
32
33
34
35
36
37
#!/bin/sh
source ~/anaconda3/etc/profile.d/conda.sh
conda activate ./573_gpu
python3 src/test_gpu.py
# Preprocess tweets
python3 src/preprocess_olid.py \
--file data/olid-training-v1.0.tsv \
--train_ids data/eng_train_ids.txt \
--val_ids data/eng_val_ids.txt \
--split_punctuation \
--remove_apostraphes \
--remove_hashtags
# Train LSTM classifier
python3 src/lstm_train.py \
--config configs/D3.json \
--train_data data/clean_train_english.tsv \
--val_data data/clean_val_english.tsv \
--model_config_path lstm_saved_configs \
--train_tokens_only
# Run LSTM predictions and generate output
python3 src/lstm_predict.py \
--config configs/D3.json \
--train_data data/clean_train_english.tsv \
--val_data data/clean_val_english.tsv \
--model_config_path lstm_saved_configs \
--model_path models/lstm_D3_best_model.pt \
--val_output_csv outputs/D3/D3_val_preds.csv
# Evaluation script
python3 src/eval.py \
--val_output_csv outputs/D3/D3_val_preds.csv \
--output_path results/D3_scores.out