|
1 | 1 | {
|
2 | 2 | "dataset_reader": {
|
3 | 3 | "class_name": "huggingface_dataset_reader",
|
4 |
| - "path": "glue", |
5 |
| - "name": "mnli", |
| 4 | + "path": "{COMPETITION}", |
| 5 | + "name": "{TASK}", |
6 | 6 | "train": "train",
|
7 | 7 | "valid": "validation_matched",
|
8 | 8 | "test": "test_matched"
|
9 | 9 | },
|
10 | 10 | "dataset_iterator": {
|
11 | 11 | "class_name": "huggingface_dataset_iterator",
|
12 |
| - "features": [ |
13 |
| - "hypothesis", |
14 |
| - "premise" |
15 |
| - ], |
| 12 | + "features": ["hypothesis", "premise"], |
16 | 13 | "label": "label",
|
17 | 14 | "seed": 42
|
18 | 15 | },
|
19 | 16 | "chainer": {
|
20 |
| - "in": [ |
21 |
| - "hypothesis", |
22 |
| - "premise" |
23 |
| - ], |
24 |
| - "in_y": [ |
25 |
| - "y" |
26 |
| - ], |
| 17 | + "in": ["hypothesis", "premise"], |
| 18 | + "in_y": ["y"], |
27 | 19 | "pipe": [
|
28 | 20 | {
|
29 | 21 | "class_name": "torch_transformers_preprocessor",
|
30 | 22 | "vocab_file": "{BASE_MODEL}",
|
31 | 23 | "do_lower_case": false,
|
32 | 24 | "max_seq_length": 128,
|
33 |
| - "in": [ |
34 |
| - "hypothesis", |
35 |
| - "premise" |
36 |
| - ], |
37 |
| - "out": [ |
38 |
| - "bert_features" |
39 |
| - ] |
| 25 | + "in": ["hypothesis", "premise"], |
| 26 | + "out": ["bert_features"] |
40 | 27 | },
|
41 | 28 | {
|
42 | 29 | "id": "classes_vocab",
|
43 | 30 | "class_name": "simple_vocab",
|
44 |
| - "fit_on": [ |
45 |
| - "y" |
46 |
| - ], |
| 31 | + "fit_on": ["y"], |
47 | 32 | "save_path": "{MODEL_PATH}/classes.dict",
|
48 | 33 | "load_path": "{MODEL_PATH}/classes.dict",
|
49 |
| - "in": [ |
50 |
| - "y" |
51 |
| - ], |
52 |
| - "out": [ |
53 |
| - "y_ids" |
54 |
| - ] |
| 34 | + "in": ["y"], |
| 35 | + "out": ["y_ids"] |
55 | 36 | },
|
56 | 37 | {
|
57 |
| - "in": [ |
58 |
| - "y_ids" |
59 |
| - ], |
60 |
| - "out": [ |
61 |
| - "y_onehot" |
62 |
| - ], |
| 38 | + "in": ["y_ids"], |
| 39 | + "out": ["y_onehot"], |
63 | 40 | "class_name": "one_hotter",
|
64 | 41 | "depth": "#classes_vocab.len",
|
65 | 42 | "single_vector": true
|
|
77 | 54 | },
|
78 | 55 | "learning_rate_drop_patience": 3,
|
79 | 56 | "learning_rate_drop_div": 2.0,
|
80 |
| - "in": [ |
81 |
| - "bert_features" |
82 |
| - ], |
83 |
| - "in_y": [ |
84 |
| - "y_ids" |
85 |
| - ], |
86 |
| - "out": [ |
87 |
| - "y_pred_probas" |
88 |
| - ] |
| 57 | + "in": ["bert_features"], |
| 58 | + "in_y": ["y_ids"], |
| 59 | + "out": ["y_pred_probas"] |
89 | 60 | },
|
90 | 61 | {
|
91 |
| - "in": [ |
92 |
| - "y_pred_probas" |
93 |
| - ], |
94 |
| - "out": [ |
95 |
| - "y_pred_ids" |
96 |
| - ], |
| 62 | + "in": ["y_pred_probas"], |
| 63 | + "out": ["y_pred_ids"], |
97 | 64 | "class_name": "proba2labels",
|
98 | 65 | "max_proba": true
|
99 | 66 | },
|
100 | 67 | {
|
101 |
| - "in": [ |
102 |
| - "y_pred_ids" |
103 |
| - ], |
104 |
| - "out": [ |
105 |
| - "y_pred_labels" |
106 |
| - ], |
| 68 | + "in": ["y_pred_ids"], |
| 69 | + "out": ["y_pred_labels"], |
107 | 70 | "ref": "classes_vocab"
|
108 | 71 | }
|
109 | 72 | ],
|
110 |
| - "out": [ |
111 |
| - "y_pred_labels" |
112 |
| - ] |
| 73 | + "out": ["y_pred_labels"] |
113 | 74 | },
|
114 | 75 | "train": {
|
115 | 76 | "batch_size": 4,
|
116 |
| - "metrics": [ |
117 |
| - "accuracy" |
118 |
| - ], |
| 77 | + "metrics": ["accuracy"], |
119 | 78 | "validation_patience": 10,
|
120 | 79 | "val_every_n_batches": 250,
|
121 | 80 | "log_every_n_batches": 250,
|
122 | 81 | "show_examples": false,
|
123 |
| - "evaluation_targets": [ |
124 |
| - "valid" |
125 |
| - ], |
| 82 | + "evaluation_targets": ["valid"], |
126 | 83 | "class_name": "torch_trainer",
|
127 | 84 | "tensorboard_log_dir": "{MODEL_PATH}/",
|
128 | 85 | "pytest_max_batches": 2
|
129 | 86 | },
|
130 | 87 | "metadata": {
|
131 | 88 | "variables": {
|
132 |
| - "ROOT_PATH": "~/.deeppavlov", |
133 | 89 | "BASE_MODEL": "roberta-large",
|
| 90 | + "ROOT_PATH": "~/.deeppavlov", |
134 | 91 | "DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
|
135 | 92 | "MODELS_PATH": "{ROOT_PATH}/models",
|
136 |
| - "MODEL_PATH": "{MODELS_PATH}/classifiers/glue_mnli_{BASE_MODEL}" |
| 93 | + "COMPETITION": "glue", |
| 94 | + "TASK": "mnli", |
| 95 | + "MODEL_PATH": "{MODELS_PATH}/{COMPETITION}/{TASK}/{BASE_MODEL}" |
137 | 96 | },
|
138 | 97 | "download": [
|
139 | 98 | {
|
140 | 99 | "url": "http://files.deeppavlov.ai/0.16/classifiers/glue_mnli.tar.gz",
|
141 |
| - "subdir": "{MODELS_PATH}" |
| 100 | + "subdir": "{MODEL_PATH}" |
142 | 101 | }
|
143 | 102 | ]
|
144 | 103 | }
|
|
0 commit comments