init
Browse files
training_scripts/finetune_t5.py
CHANGED
@@ -221,6 +221,7 @@ def train(
|
|
221 |
set([_l for __i, _l in zip(_i[dataset_column_label], label_list) if __i == 1]) for _i in dataset_tmp
|
222 |
]
|
223 |
eval_metric = get_f1_score(_references, output)
|
|
|
224 |
logging.info(json.dumps(eval_metric, indent=4))
|
225 |
with open(f'{output_dir}/best_model/evaluation_metrics.json', 'w') as f:
|
226 |
json.dump(eval_metric, f)
|
|
|
221 |
set([_l for __i, _l in zip(_i[dataset_column_label], label_list) if __i == 1]) for _i in dataset_tmp
|
222 |
]
|
223 |
eval_metric = get_f1_score(_references, output)
|
224 |
+
eval_metric[f'f1/{dataset}/{dataset_name}'] = eval_metric.pop('f1')
|
225 |
logging.info(json.dumps(eval_metric, indent=4))
|
226 |
with open(f'{output_dir}/best_model/evaluation_metrics.json', 'w') as f:
|
227 |
json.dump(eval_metric, f)
|
training_scripts/script.sh
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
|
2 |
-
# TweetTopic
|
3 |
python finetune_t5.py --dataset-name en_2022 --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
python finetune_t5.py --dataset-name es --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-es --model-organization cardiffnlp --use-auth-token
|
6 |
python finetune_t5.py --dataset-name en --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en --model-organization cardiffnlp --use-auth-token
|
|
|
1 |
|
2 |
+
# English TweetTopic
|
3 |
python finetune_t5.py --dataset-name en_2022 --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
4 |
+
# Zero-shot
|
5 |
+
python finetune_t5.py -m cardiffnlp/mt5-small-tweet-topic-multi-en-2022 --dataset-name en --skip-train --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
6 |
+
python finetune_t5.py -m cardiffnlp/mt5-small-tweet-topic-multi-en-2022 --dataset-name en --skip-train --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
7 |
+
python finetune_t5.py -m cardiffnlp/mt5-small-tweet-topic-multi-en-2022 --dataset-name en --skip-train --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
8 |
+
python finetune_t5.py -m cardiffnlp/mt5-small-tweet-topic-multi-en-2022 --dataset-name en --skip-train --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en-2022 --model-organization cardiffnlp --use-auth-token
|
9 |
+
|
10 |
+
|
11 |
|
12 |
python finetune_t5.py --dataset-name es --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-es --model-organization cardiffnlp --use-auth-token
|
13 |
python finetune_t5.py --dataset-name en --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-en --model-organization cardiffnlp --use-auth-token
|