Skip to content

Commit

Permalink
Release 0.16.0
Browse files Browse the repository at this point in the history
Release 0.16.0
  • Loading branch information
IgnatovFedor authored Aug 2, 2021
2 parents 6c8f892 + 1ca495a commit d60649a
Show file tree
Hide file tree
Showing 87 changed files with 3,241 additions and 3,447 deletions.
2 changes: 1 addition & 1 deletion deeppavlov/_meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.15.0'
__version__ = '0.16.0'
__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
96 changes: 96 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_mnli_roberta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"dataset_reader": {
"class_name": "huggingface_dataset_reader",
"path": "glue",
"name": "mnli",
"train": "train",
"valid": "validation_matched",
"test": "test_matched"
},
"dataset_iterator": {
"class_name": "huggingface_dataset_iterator",
"features": ["hypothesis", "premise"],
"label": "label",
"seed": 42
},
"chainer": {
"in": ["hypothesis", "premise"],
"in_y": ["y"],
"pipe": [
{
"class_name": "torch_transformers_preprocessor",
"vocab_file": "{BASE_MODEL}",
"do_lower_case": false,
"max_seq_length": 128,
"in": ["hypothesis", "premise"],
"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": 4,
"metrics": ["accuracy"],
"validation_patience": 10,
"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
},
"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_mnli_{BASE_MODEL}"
}
}
}
96 changes: 96 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_rte_roberta_mnli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"dataset_reader": {
"class_name": "huggingface_dataset_reader",
"path": "glue",
"name": "rte",
"train": "train",
"valid": "validation",
"test": "test"
},
"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": 256,
"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-06
},
"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": 4,
"metrics": ["accuracy"],
"epochs": 2,
"val_every_n_epochs": 1,
"log_every_n_epochs": 1,
"show_examples": false,
"evaluation_targets": ["train", "valid"],
"class_name": "torch_trainer",
"tensorboard_log_dir": "{MODEL_PATH}/",
"pytest_max_batches": 2
},
"metadata": {
"variables": {
"BASE_MODEL": "roberta-large-mnli",
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/glue_rte_{BASE_MODEL}"
}
}
}
2 changes: 1 addition & 1 deletion deeppavlov/configs/classifiers/intents_dstc2.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"in": "y_pred_probas",
"out": "y_pred_ids",
"class_name": "proba2labels",
"confident_threshold": 0.5
"confidence_threshold": 0.5
},
{
"in": "y_pred_ids",
Expand Down
2 changes: 1 addition & 1 deletion deeppavlov/configs/classifiers/intents_dstc2_bert.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"in": "y_pred_probas",
"out": "y_pred_ids",
"class_name": "proba2labels",
"confident_threshold": 0.5
"confidence_threshold": 0.5
},
{
"in": "y_pred_ids",
Expand Down
2 changes: 1 addition & 1 deletion deeppavlov/configs/classifiers/intents_dstc2_big.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"in": "y_pred_probas",
"out": "y_pred_ids",
"class_name": "proba2labels",
"confident_threshold": 0.5
"confidence_threshold": 0.5
},
{
"in": "y_pred_ids",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"dataset_reader": {
"class_name": "paraphraser_reader",
"data_path": "{DOWNLOADS_PATH}/paraphraser_data",
"do_lower_case": false
},
"dataset_iterator": {
"class_name": "siamese_iterator",
"seed": 243,
"len_valid": 500
},
"chainer": {
"in": ["text_a", "text_b"],
"in_y": ["y"],
"pipe": [
{
"class_name": "torch_transformers_preprocessor",
"vocab_file": "{TRANSFORMER}",
"do_lower_case": false,
"max_seq_length": 64,
"in": ["text_a", "text_b"],
"out": ["bert_features"]
},
{
"class_name": "torch_transformers_classifier",
"n_classes": 2,
"return_probas": false,
"pretrained_bert": "{TRANSFORMER}",
"save_path": "{MODEL_PATH}/model",
"load_path": "{MODEL_PATH}/model",
"attention_probs_keep_prob": 0.11,
"hidden_keep_prob": 1.0,
"optimizer": "AdamW",
"optimizer_parameters": {
"lr": 1.89e-05
},
"learning_rate_drop_patience": 3,
"learning_rate_drop_div": 1.5,
"in": [
"bert_features"
],
"in_y": [
"y"
],
"out": [
"predictions"
]
}
],
"out": ["predictions"]
},
"train": {
"epochs": 100,
"batch_size": 64,
"metrics": [
"f1",
"accuracy"
],
"validation_patience": 7,
"val_every_n_batches": 50,
"log_every_n_batches": 50,
"evaluation_targets": [
"train",
"valid",
"test"
],
"tensorboard_log_dir": "{MODEL_PATH}/",
"class_name": "torch_trainer"
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"TRANSFORMER": "DeepPavlov/distilrubert-tiny-cased-conversational",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/paraphraser_convers_distilrubert_2L"
},
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/classifiers/paraphraser_convers_distilrubert_2L.tar.gz",
"subdir": "{MODELS_PATH}"
},
{
"url": "http://files.deeppavlov.ai/datasets/paraphraser.zip",
"subdir": "{DOWNLOADS_PATH}/paraphraser_data"
},
{
"url": "http://files.deeppavlov.ai/datasets/paraphraser_gold.zip",
"subdir": "{DOWNLOADS_PATH}/paraphraser_data"
}
]
}
}
Loading

0 comments on commit d60649a

Please sign in to comment.