Rasa NLU evaluation script is broken?

Rasa_NLU: 0.13.0

Trying to evaluate the NLU model with the following command

$ pythonw -m rasa_nlu.evaluate --data rob_nlu_tf/data/nlu_data.json --model rob_nlu_tf/models/nlu/default/current

Getting this AttributeError

2018-08-20 18:23:56 INFO     __main__  - Intent evaluation results:
Traceback (most recent call last):
  File "/Users/p/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/p/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/p/anaconda3/lib/python3.6/site-packages/rasa_nlu/evaluate.py", line 842, in <module>
    main()
  File "/Users/p/anaconda3/lib/python3.6/site-packages/rasa_nlu/evaluate.py", line 836, in main
    cmdline_args.histogram)
  File "/Users/p/anaconda3/lib/python3.6/site-packages/rasa_nlu/evaluate.py", line 629, in run_evaluation
    intent_hist_filename)
  File "/Users/p/anaconda3/lib/python3.6/site-packages/rasa_nlu/evaluate.py", line 257, in evaluate_intents
    intent_results = remove_empty_intent_examples(intent_results)
  File "/Users/p/anaconda3/lib/python3.6/site-packages/rasa_nlu/evaluate.py", line 176, in remove_empty_intent_examples
    r.prediction = ""
AttributeError: can't set attribute

Here’s the solution: https://github.com/RasaHQ/rasa_nlu/issues/1298 but as I understand this commit is not in the actual build yet, so jump to the commit and edit evaluate.py file accordingly.

1 Like

Thanks.