asahi417 commited on
Commit
497666d
·
1 Parent(s): 0915787
training_scripts/finetune_t5.py CHANGED
@@ -229,7 +229,7 @@ def upload(
229
  copy_tree(f'{output_dir}/best_model', model_alias)
230
  dataset_instance = load_dataset(dataset, dataset_name, split='validation', use_auth_token=use_auth_token)
231
  sample = [i[dataset_column_text] for i in dataset_instance]
232
- sample = [i for i in sample if ''' not in i and ''' not in i][:3]
233
  widget = '\n'.join([f"- text: '{t}'\n example_title: example {_n + 1}" for _n, t in enumerate(sample)])
234
  with open(f'{model_alias}/README.md', 'w') as f:
235
  f.write(f"""
 
229
  copy_tree(f'{output_dir}/best_model', model_alias)
230
  dataset_instance = load_dataset(dataset, dataset_name, split='validation', use_auth_token=use_auth_token)
231
  sample = [i[dataset_column_text] for i in dataset_instance]
232
+ sample = [i for i in sample if "'" not in i and '"' not in i][:3]
233
  widget = '\n'.join([f"- text: '{t}'\n example_title: example {_n + 1}" for _n, t in enumerate(sample)])
234
  with open(f'{model_alias}/README.md', 'w') as f:
235
  f.write(f"""
training_scripts/script.sh CHANGED
@@ -1,14 +1,14 @@
1
 
2
  # training
3
  ## en_2022
4
- 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
5
  ## single
6
  [DONE] 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
7
- 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
8
  python finetune_t5.py --dataset-name ja --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-ja --model-organization cardiffnlp --use-auth-token
9
  python finetune_t5.py --dataset-name gr --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-gr --model-organization cardiffnlp --use-auth-token
10
  # mix
11
- python finetune_t5.py --dataset-name mix --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-mix --model-organization cardiffnlp --use-auth-token
12
 
13
 
14
  # Zero-shot
 
1
 
2
  # training
3
  ## en_2022
4
+ [Done] 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
5
  ## single
6
  [DONE] 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
7
+ [done] 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
8
  python finetune_t5.py --dataset-name ja --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-ja --model-organization cardiffnlp --use-auth-token
9
  python finetune_t5.py --dataset-name gr --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-gr --model-organization cardiffnlp --use-auth-token
10
  # mix
11
+ [Done] python finetune_t5.py --dataset-name mix --low-cpu-mem-usage --model-alias mt5-small-tweet-topic-multi-mix --model-organization cardiffnlp --use-auth-token
12
 
13
 
14
  # Zero-shot