pere commited on
Commit
db9d040
1 Parent(s): e73c2c5

some stuff

Browse files
batch_finetune_eu_jav_base_exp_fulltext.sh CHANGED
@@ -1,11 +1,11 @@
1
  PROJECT_DIR=${HOME}"/models/eu-jav-categorisation"
2
  export PYTHONPATH=${PROJECT_DIR}
3
  INITIAL_CHECKPOINT_PATH=\"gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000\"
4
- TRAIN_STEPS=1005000
5
 
6
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_classify_tweets_fulltext_base_v1\" &&
7
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_classify_tweets_fulltext_base_v2\" &&
8
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_classify_tweets_fulltext_base_v3\" &&
9
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_classify_tweets_fulltext_base_v4\" &&
10
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_classify_tweets_fulltext_base_v5\"
11
 
 
1
  PROJECT_DIR=${HOME}"/models/eu-jav-categorisation"
2
  export PYTHONPATH=${PROJECT_DIR}
3
  INITIAL_CHECKPOINT_PATH=\"gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000\"
4
+ TRAIN_STEPS=1010000
5
 
6
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_corrected_classify_tweets_fulltext_base_v1\" &&
7
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_corrected_classify_tweets_fulltext_base_v2\" &&
8
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_corrected_classify_tweets_fulltext_base_v3\" &&
9
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_corrected_classify_tweets_fulltext_base_v4\" &&
10
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_classification_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"classify_tweets_fulltext\" --gin.MODEL_DIR=\"gs://eu-jav-t5x/finetuned/italian_tweets/fulltext_corrected_classify_tweets_fulltext_base_v5\"
11
 
finetune_classification_base.gin CHANGED
@@ -11,7 +11,7 @@ include "t5x/examples/t5/mt5/base.gin"
11
  include "t5x/configs/runs/finetune.gin"
12
 
13
  MIXTURE_OR_TASK_NAME = %gin.REQUIRED
14
- TASK_FEATURE_LENGTHS = {"inputs": 256, "targets": 32}
15
  INITIAL_CHECKPOINT_PATH = %gin.REQUIRED
16
  TRAIN_STEPS = %gin.REQUIRED # 1000000 pre-trained steps + 10000 fine-tuning steps.
17
  USE_CACHED_TASKS = False
@@ -24,7 +24,7 @@ infer_eval/utils.DatasetConfig:
24
 
25
  #Saving every 1000 steps
26
  utils.SaveCheckpointConfig:
27
- period = 100
28
 
29
 
30
  # Pere: Only necessary if we load a t5 model. We can start with an t5x model here
 
11
  include "t5x/configs/runs/finetune.gin"
12
 
13
  MIXTURE_OR_TASK_NAME = %gin.REQUIRED
14
+ TASK_FEATURE_LENGTHS = {"inputs": 256, "targets": 64}
15
  INITIAL_CHECKPOINT_PATH = %gin.REQUIRED
16
  TRAIN_STEPS = %gin.REQUIRED # 1000000 pre-trained steps + 10000 fine-tuning steps.
17
  USE_CACHED_TASKS = False
 
24
 
25
  #Saving every 1000 steps
26
  utils.SaveCheckpointConfig:
27
+ period = 1000
28
 
29
 
30
  # Pere: Only necessary if we load a t5 model. We can start with an t5x model here
tasks.py CHANGED
@@ -59,7 +59,7 @@ def categorise_fulltext_preprocessor(ds):
59
  t="il testo è favorevole alla vaccinazione"
60
  elif t=="1":
61
  t="il testo è neutro rispetto alla vaccinazione"
62
- elif t=="3":
63
  t="is testo è sfavorevole alla vaccinazione"
64
  return t
65
 
 
59
  t="il testo è favorevole alla vaccinazione"
60
  elif t=="1":
61
  t="il testo è neutro rispetto alla vaccinazione"
62
+ elif t=="2":
63
  t="is testo è sfavorevole alla vaccinazione"
64
  return t
65