Rasa_nlu evalution error


(Selvaraj S) #1

Please help to solve below error

TypeError Traceback (most recent call last) in () 2 from rasa_nlu.evaluate import run_evaluation 3 ----> 4 run_evaluation(“nlu.md”, model_directory)

/usr/local/lib/python3.5/dist-packages/rasa_nlu/evaluate.py in run_evaluation(data_path, model_path, errors_filename, confmat_filename, intent_hist_filename, component_builder) 628 629 evaluate_intents(intent_results, errors_filename, confmat_filename, –> 630 intent_hist_filename) 631 632 if extractors:

/usr/local/lib/python3.5/dist-packages/rasa_nlu/evaluate.py in evaluate_intents(intent_results, errors_filename, confmat_filename, intent_hist_filename) 268 269 if errors: –> 270 save_nlu_errors(errors, errors_filename) 271 272 cnf_matrix = confusion_matrix(targets, predictions)

/usr/local/lib/python3.5/dist-packages/rasa_nlu/evaluate.py in save_nlu_errors(errors, filename) 203 204 utils.write_to_file(filename, –> 205 json.dumps(errors, indent=4, ensure_ascii=False)) 206 logger.info(“Model prediction errors saved to {}.”.format(filename)) 207

/usr/local/lib/python3.5/dist-packages/rasa_nlu/utils/init.py in write_to_file(filename, text) 194 “”“Write a text to a file.”"" 195 –> 196 with io.open(filename, ‘w’, encoding=“utf-8”) as f: 197 f.write(str(text)) 198

TypeError: invalid file: None

stories_md = “”"


(Akela Drissner) #2

Can you format this with ``` please? It’s very hard to read in this format