RasaHQ / rasalit

Visualizations and helpers to improve and debug machine learning models for Rasa Open Source
Apache License 2.0
305 stars 62 forks source link

No response_selection_report.json file scenario #23

Closed dingusagar closed 3 years ago

dingusagar commented 3 years ago

If there is no ResponseSelector examples in the training data, rasa test nlu command does not create a response_selection_report.json. Rasalit assumes this file to be present rasalit.overview.common.read_reports function. The code breaks here while trying to drop the support column in the dataframe. It gives the following error. keyError: "['support'] not found in axis This dataframe is empty because there was no response_selection_report.json in the folder.

The fix here is just doing a check if such response_selection_report.json files exist. If these files are not there, rasalit.overview.common.read_reports simply returns an empty DataFrame.

sara-tagger commented 3 years ago

Thanks for submitting a pull request 🚀 @tmbo will take a look at it as soon as possible ✨

koaning commented 3 years ago

There's a minor tweak possible since the else statement is not needed in the code but I'll just go ahead and change that myself manually. No need to do a back-forth here for that.

Thanks!

dingusagar commented 3 years ago

that was a silly mistake from my side. I was just fixing it. anyways thanks for fixing it and merging. I am new to open source contributions, enjoying code reading of rasa projects :)