Skip to content

Commit

Permalink
Release 0.13.0
Browse files Browse the repository at this point in the history
Release 0.13.0
  • Loading branch information
IgnatovFedor committed Nov 13, 2020
2 parents b66179e + 6edffff commit b4dc56a
Show file tree
Hide file tree
Showing 57 changed files with 2,156 additions and 473 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,8 @@ download/

# project data
/data/

# local dockerfiles
/Dockerfile
/entrypoint.sh
/.dockerignore
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.12.1'
__version__ = '0.13.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
134 changes: 134 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_cola_cased_bert_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"dataset_reader": {
"class_name": "huggingface_dataset_reader",
"path": "glue",
"name": "cola",
"train": "train",
"valid": "validation",
"test": "test"
},
"dataset_iterator": {
"class_name": "huggingface_dataset_iterator",
"features": "sentence",
"label": "label",
"seed": 42
},
"chainer": {
"in": [
"x"
],
"in_y": [
"y"
],
"pipe": [
{
"class_name": "torch_bert_preprocessor",
"vocab_file": "{BASE_MODEL}",
"do_lower_case": false,
"max_seq_length": 64,
"in": [
"x"
],
"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_bert_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": 2e-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": 128,
"metrics": ["matthews_correlation"],
"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",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/glue_cola_torch_cased_bert",
"BASE_MODEL": "bert-base-cased"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/pytorch.txt",
"{DEEPPAVLOV_PATH}/requirements/transformers.txt"
]
}
}
100 changes: 100 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_mnli_cased_bert_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"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_bert_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_bert_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": 2e-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": 64,
"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",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/glue_mnli_torch_cased_bert",
"BASE_MODEL": "bert-base-cased"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/pytorch.txt",
"{DEEPPAVLOV_PATH}/requirements/transformers.txt"
]
}
}
100 changes: 100 additions & 0 deletions deeppavlov/configs/classifiers/glue/glue_mnli_mm_cased_bert_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"dataset_reader": {
"class_name": "huggingface_dataset_reader",
"path": "glue",
"name": "mnli",
"train": "train",
"valid": "validation_mismatched",
"test": "test_mismatched"
},
"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_bert_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_bert_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": 2e-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": 64,
"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",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/glue_mnli_mm_torch_cased_bert",
"BASE_MODEL": "bert-base-cased"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/pytorch.txt",
"{DEEPPAVLOV_PATH}/requirements/transformers.txt"
]
}
}

0 comments on commit b4dc56a

Please sign in to comment.