Skip to content

Commit a3fe72e

Browse files
committed
Add model_dir to store the tf graph, edited eval for vm setups
1 parent 3535dfc commit a3fe72e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

rasa_nlu/evaluate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,12 @@ def evaluate_intents(intent_results,
340340
plot_confusion_matrix(cnf_matrix, classes=labels,
341341
title='Intent Confusion matrix',
342342
out=confmat_filename)
343-
plt.show()
343+
# plt.show()
344344

345345
plot_intent_confidences(intent_results,
346346
intent_hist_filename)
347347

348-
plt.show()
348+
# plt.show()
349349

350350
predictions = [
351351
{

rasa_nlu/featurizers/bert_featurizer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def __init__(self, component_config=None):
5656
is_per_host = tf.contrib.tpu.InputPipelineConfig.PER_HOST_V2
5757
run_config = tf.contrib.tpu.RunConfig(
5858
master=None,
59+
model_dir='/tmp/bert_model',
5960
tpu_config=tf.contrib.tpu.TPUConfig(
6061
num_shards=8,
6162
per_host_input_for_training=is_per_host))
@@ -73,7 +74,6 @@ def __init__(self, component_config=None):
7374
predict_batch_size=8)
7475

7576
def train(self, training_data, config, **kwargs):
76-
# type: (TrainingData) -> None
7777
messages = [example.text for example in training_data.intent_examples]
7878
fs = create_features(messages, self.estimator, self.tokenizer, self.layer_indexes)
7979
features = []
@@ -86,8 +86,6 @@ def train(self, training_data, config, **kwargs):
8686
# self._set_bert_features(example)
8787

8888
def process(self, message, **kwargs):
89-
# type: (Message, **Any) -> None
90-
9189
self._set_bert_features(message)
9290

9391
def _set_bert_features(self, message):

0 commit comments

Comments
 (0)