Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/glue superglue update #1508

Merged
merged 16 commits into from Dec 16, 2021
2 changes: 1 addition & 1 deletion deeppavlov/_meta.py
@@ -1,4 +1,4 @@
__version__ = '0.17.1'
__version__ = '0.17.2'
__author__ = 'Neural Networks and Deep Learning lab, MIPT'
__description__ = 'An open source library for building end-to-end dialog systems and training chatbots.'
__keywords__ = ['NLP', 'NER', 'SQUAD', 'Intents', 'Chatbot']
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/classifiers/glue/glue_mnli_roberta.json
Expand Up @@ -121,7 +121,6 @@
"log_every_n_batches": 250,
"show_examples": false,
"evaluation_targets": [
"train",
"valid"
],
"class_name": "torch_trainer",
Expand Down
Expand Up @@ -121,7 +121,6 @@
"log_every_n_epochs": 1,
"show_examples": false,
"evaluation_targets": [
"train",
"valid"
],
"class_name": "torch_trainer",
Expand Down
147 changes: 147 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_wnli_roberta.json
@@ -0,0 +1,147 @@
{
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"BASE_MODEL": "roberta-large",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/glue_wnli/{BASE_MODEL}"
},
"download": [
{
"url": "http://files.deeppavlov.ai/0.16/classifiers/glue_wnli_roberta.tar.gz",
"subdir": "{MODELS_PATH}"
}
]
},
"dataset_reader": {
"class_name": "huggingface_dataset_reader",
"path": "glue",
"name": "wnli",
"train": "train",
"valid": "validation"
},
"dataset_iterator": {
"class_name": "huggingface_dataset_iterator",
"features": [
"sentence1",
"sentence2"
],
"label": "label",
"seed": 42
},
"chainer": {
"in": [
"sentence1",
"sentence2"
],
"in_y": [
"y"
],
"pipe": [
{
"class_name": "torch_transformers_preprocessor",
"vocab_file": "{BASE_MODEL}",
"do_lower_case": false,
"max_seq_length": 192,
"truncation": "longest_first",
"padding": "longest",
"in": [
"sentence1",
"sentence2"
],
"out": [
"bert_features"
]
},
{
"id": "classes_vocab",
"class_name": "simple_vocab",
"fit_on": [
"y"
],
"save_path": "{MODEL_PATH}/classes.dict",
"load_path": "{MODEL_PATH}/classes.dict",
"in": [
"y"
],
"out": [
"y_ids"
]
},
{
"in": [
"y_ids"
],
"out": [
"y_onehot"
],
"class_name": "one_hotter",
"depth": "#classes_vocab.len",
"single_vector": true
},
{
"class_name": "torch_transformers_classifier",
"n_classes": "#classes_vocab.len",
"return_probas": true,
"pretrained_bert": "{BASE_MODEL}",
"save_path": "{MODEL_PATH}/model",
"load_path": "{MODEL_PATH}/model",
"optimizer": "AdamW",
"optimizer_parameters": {
"lr": 1e-05
},
"learning_rate_drop_patience": 3,
"learning_rate_drop_div": 2.0,
"in": [
"bert_features"
],
"in_y": [
"y_ids"
],
"out": [
"y_pred_probas"
]
},
{
"in": [
"y_pred_probas"
],
"out": [
"y_pred_ids"
],
"class_name": "proba2labels",
"max_proba": true
},
{
"in": [
"y_pred_ids"
],
"out": [
"y_pred_labels"
],
"ref": "classes_vocab"
}
],
"out": [
"y_pred_labels"
]
},
"train": {
"batch_size": 24,
"metrics": [
"accuracy"
],
"epochs": 1,
"val_every_n_batches": 250,
"log_every_n_batches": 250,
"show_examples": false,
"evaluation_targets": [
"train",
"valid"
],
"class_name": "torch_trainer",
"tensorboard_log_dir": "{MODEL_PATH}/",
"pytest_max_batches": 2
}
}