pere commited on
Commit
28d6fa5
1 Parent(s): 0173bf7

batch parliament base

Browse files
batch_parliament_base.sh CHANGED
@@ -1,19 +1,12 @@
1
  PROJECT_DIR=${HOME}"/models/t5-parliament-categorisation"
2
  export PYTHONPATH=${PROJECT_DIR}
 
 
 
 
 
 
 
 
3
 
4
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin_file="finetune_categorisation_base.gin" --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/v1_norwegian_NCC_plus_English_t5x_base_1_500_000_parliament\" &&
5
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin_file="finetune_categorisation_base.gin" --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/v2_norwegian_NCC_plus_English_t5x_base_1_500_000_parliament\" &&
6
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin_file="finetune_categorisation_base.gin" --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/v3_norwegian_NCC_plus_English_t5x_base_1_500_000_parliament\" &&
7
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin_file="finetune_categorisation_base.gin" --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/v4_norwegian_NCC_plus_English_t5x_base_1_500_000_parliament\" &&
8
- python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin_file="finetune_categorisation_base.gin" --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/v5_norwegian_NCC_plus_English_t5x_base_1_500_000_parliament\" &&
9
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"validation\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v1_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
10
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"validation\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v2_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
11
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"validation\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v3_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
12
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"validation\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v4_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
13
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"validation\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v5_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
14
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"test\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v1_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
15
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"test\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v2_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
16
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"test\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v3_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
17
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"test\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v4_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
18
- python3 eval.py --gin_search_paths="./" --gin_file="eval_categorisation_base.gin" --gin.SPLIT=\"test\" --gin.CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/v5_finetuned/norwegian_NCC_plus_English_t5x_base_1_500_000_parliament/checkpoint_1510000\" &&
19
 
 
1
  PROJECT_DIR=${HOME}"/models/t5-parliament-categorisation"
2
  export PYTHONPATH=${PROJECT_DIR}
3
+ INITIAL_CHECKPOINT_PATH=\"gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_base/checkpoint_1500000\"
4
+ TRAIN_STEPS=1505000
5
+
6
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_categorisation_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/parliament_NCC_base_v1\" &&
7
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_categorisation_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/parliament_NCC_base_v2\" &&
8
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_categorisation_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/parliament_NCC_base_v3\" &&
9
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_categorisation_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/parliament_NCC_base_v4\" &&
10
+ python3 ../../t5x/t5x/train.py --gin_search_paths="./" --gin.TRAIN_STEPS=${TRAIN_STEPS} --gin_file="finetune_categorisation_base.gin" --gin.INITIAL_CHECKPOINT_PATH=${INITIAL_CHECKPOINT_PATH} --gin.MIXTURE_OR_TASK_NAME=\"parliament\" --gin.MODEL_DIR=\"gs://nb-t5x-us-central2/finetuned/parliament_NCC_base_v5\"
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
finetune_categorisation_base.gin CHANGED
@@ -12,9 +12,8 @@ include "t5x/configs/runs/finetune.gin"
12
 
13
  MIXTURE_OR_TASK_NAME = %gin.REQUIRED
14
  TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
15
- #INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_base/checkpoint_1500000"
16
- INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
17
- TRAIN_STEPS = 1_010_000 # 1000000 pre-trained steps + 10000 fine-tuning steps.
18
  USE_CACHED_TASKS = False
19
  DROPOUT_RATE = 0.1
20
  RANDOM_SEED = 0
 
12
 
13
  MIXTURE_OR_TASK_NAME = %gin.REQUIRED
14
  TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
15
+ INITIAL_CHECKPOINT_PATH = %gin.REQUIRED #"gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
16
+ TRAIN_STEPS = %gin.REQUIRED #1_010_000 # 1000000 pre-trained steps + 10000 fine-tuning steps.
 
17
  USE_CACHED_TASKS = False
18
  DROPOUT_RATE = 0.1
19
  RANDOM_SEED = 0