DeepPavlov
DeepPavlov copied to clipboard
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'
Пытаюсь собрать модель из конфига
rusentiment_bert.json:
{
"dataset_reader": {
"class_name": "basic_classification_reader",
"x": "text",
"y": "intent",
"data_path": "./rubert/data",
"train": "dataset.csv",
"valid": "valid.csv",
"test": "test.csv"
},
"dataset_iterator": {
"class_name": "basic_classification_iterator",
"seed": 42
},
"chainer": {
"in": [
"x"
],
"in_y": [
"y"
],
"pipe": [
{
"class_name": "bert_preprocessor",
"vocab_file": "./rubert/vocab.txt",
"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": "./rubert",
"load_path": "./rubert",
"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": "./rubert/bert_config.json",
"pretrained_bert": "./rubert/bert_model.ckpt",
"save_path": "./model",
"load_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": 64,
"epochs": 100,
"metrics": [
"f1_weighted",
"f1_macro",
"accuracy",
{
"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": "./train_log"
},
"metadata": {
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/tf.txt",
"{DEEPPAVLOV_PATH}/requirements/bert_dp.txt"
],
}
}
Получаю следующую ошибку:
