Skip to content

Commit

Permalink
Release 0.9.0 (#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoptar committed Apr 20, 2020
2 parents c10b079 + fdab459 commit 5882228
Show file tree
Hide file tree
Showing 46 changed files with 2,661 additions and 116 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ node('cuda-module') {
throw e
}
finally {
emailext to: '${DEFAULT_RECIPIENTS}',
emailext to: "\${DEFAULT_RECIPIENTS}, ${CHANGE_AUTHOR_EMAIL}",
subject: "${env.JOB_NAME} - Build # ${currentBuild.number} - ${currentBuild.result}!",
body: '${BRANCH_NAME} - ${BUILD_URL}',
attachLog: true
Expand Down
4 changes: 2 additions & 2 deletions deeppavlov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def evaluate_model(config: [str, Path, dict], download: bool = False, recursive:
except ImportError:
'Assuming that requirements are not yet installed'

__version__ = '0.8.0'
__version__ = '0.9.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']
__license__ = 'Apache License, Version 2.0'
__email__ = 'info@ipavlov.ai'
__email__ = 'info@deeppavlov.ai'

# check version
assert sys.hexversion >= 0x3060000, 'Does not work in python3.5 or lower'
Expand Down
146 changes: 146 additions & 0 deletions deeppavlov/configs/classifiers/sentiment_imdb_bert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"dataset_reader": {
"class_name": "imdb_reader",
"data_path": "{DOWNLOADS_PATH}/aclImdb"
},
"dataset_iterator": {
"class_name": "basic_classification_iterator",
"seed": 42,
"split_seed": 23,
"field_to_split": "train",
"stratify": true,
"split_fields": [
"train",
"valid"
],
"split_proportions": [
0.9,
0.1
]
},
"chainer": {
"in": [
"x"
],
"in_y": [
"y"
],
"pipe": [
{
"class_name": "bert_preprocessor",
"vocab_file": "{DOWNLOADS_PATH}/bert_models/cased_L-12_H-768_A-12/vocab.txt",
"do_lower_case": false,
"max_seq_length": 450,
"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": "bert_classifier",
"n_classes": "#classes_vocab.len",
"return_probas": true,
"one_hot_labels": true,
"bert_config_file": "{DOWNLOADS_PATH}/bert_models/cased_L-12_H-768_A-12/bert_config.json",
"pretrained_bert": "{DOWNLOADS_PATH}/bert_models/cased_L-12_H-768_A-12/bert_model.ckpt",
"save_path": "{MODEL_PATH}/model",
"load_path": "{MODEL_PATH}/model",
"keep_prob": 0.5,
"learning_rate": 1e-05,
"learning_rate_drop_patience": 5,
"learning_rate_drop_div": 2.0,
"in": [
"bert_features"
],
"in_y": [
"y_onehot"
],
"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": 8,
"epochs": 100,
"metrics": [
"f1_weighted",
"f1_macro",
{
"name": "roc_auc",
"inputs": [
"y_onehot",
"y_pred_probas"
]
}
],
"show_examples": false,
"pytest_max_batches": 2,
"validation_patience": 5,
"val_every_n_epochs": 1,
"log_every_n_epochs": 1,
"evaluation_targets": [
"train",
"valid",
"test"
],
"tensorboard_log_dir": "{MODEL_PATH}/"
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/sentiment_imdb_bert_v0/"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/tf.txt",
"{DEEPPAVLOV_PATH}/requirements/bert_dp.txt"
],
"labels": {
"telegram_utils": "IntentModel",
"server_utils": "KerasIntentModel"
},
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/bert/cased_L-12_H-768_A-12.zip",
"subdir": "{DOWNLOADS_PATH}/bert_models"
}
]
}
}
146 changes: 146 additions & 0 deletions deeppavlov/configs/classifiers/sentiment_imdb_conv_bert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"dataset_reader": {
"class_name": "imdb_reader",
"data_path": "{DOWNLOADS_PATH}/aclImdb"
},
"dataset_iterator": {
"class_name": "basic_classification_iterator",
"seed": 42,
"split_seed": 23,
"field_to_split": "train",
"stratify": true,
"split_fields": [
"train",
"valid"
],
"split_proportions": [
0.9,
0.1
]
},
"chainer": {
"in": [
"x"
],
"in_y": [
"y"
],
"pipe": [
{
"class_name": "bert_preprocessor",
"vocab_file": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/vocab.txt",
"do_lower_case": false,
"max_seq_length": 450,
"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": "bert_classifier",
"n_classes": "#classes_vocab.len",
"return_probas": true,
"one_hot_labels": true,
"bert_config_file": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/bert_config.json",
"pretrained_bert": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/bert_model.ckpt",
"save_path": "{MODEL_PATH}/model",
"load_path": "{MODEL_PATH}/model",
"keep_prob": 0.5,
"learning_rate": 1e-05,
"learning_rate_drop_patience": 5,
"learning_rate_drop_div": 2.0,
"in": [
"bert_features"
],
"in_y": [
"y_onehot"
],
"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": 8,
"epochs": 100,
"metrics": [
"f1_weighted",
"f1_macro",
{
"name": "roc_auc",
"inputs": [
"y_onehot",
"y_pred_probas"
]
}
],
"show_examples": false,
"pytest_max_batches": 2,
"validation_patience": 5,
"val_every_n_epochs": 1,
"log_every_n_epochs": 1,
"evaluation_targets": [
"train",
"valid",
"test"
],
"tensorboard_log_dir": "{MODEL_PATH}/"
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/sentiment_imdb_conv_bert_v0/"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/tf.txt",
"{DEEPPAVLOV_PATH}/requirements/bert_dp.txt"
],
"labels": {
"telegram_utils": "IntentModel",
"server_utils": "KerasIntentModel"
},
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/bert/conversational_cased_L-12_H-768_A-12.tar.gz",
"subdir": "{DOWNLOADS_PATH}/bert_models"
}
]
}
}
5 changes: 2 additions & 3 deletions deeppavlov/configs/elmo/elmo_1b_benchmark.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
}
],
"out": [
"x_char_ids",
"y_token_ids"
"x_char_ids"
]
},
"train": {
Expand Down Expand Up @@ -83,4 +82,4 @@
}
]
}
}
}
5 changes: 2 additions & 3 deletions deeppavlov/configs/elmo/elmo_1b_benchmark_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
}
],
"out": [
"x_char_ids",
"y_token_ids"
"x_char_ids"
]
},
"train": {
Expand Down Expand Up @@ -81,4 +80,4 @@
}
]
}
}
}
29 changes: 29 additions & 0 deletions deeppavlov/configs/nemo/asr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"chainer": {
"in": "speech",
"pipe": [
{
"class_name": "nemo_asr",
"nemo_params_path": "{NEMO_PATH}/quartznet15x5/quartznet15x5.yaml",
"load_path": "{NEMO_PATH}/quartznet15x5",
"in": ["speech"],
"out": ["text"]
}
],
"out": ["text"]
},
"metadata": {
"variables": {
"NEMO_PATH": "~/.deeppavlov/models/nemo"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/nemo-asr.txt"
],
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/nemo/quartznet15x5.tar.gz",
"subdir": "{NEMO_PATH}"
}
]
}
}

0 comments on commit 5882228

Please sign in to comment.