Rasa Webchat Integration

hey @muthukumars, can you show the screenshot of your error’s trace log?

hey @muthukumars, have you registered the socket.io channel in your credentials.yml file ?

You mean, I have to do this in config.yml

socketio: user_message_evt: user_uttered bot_message_evt: bot_uttered session_persistence: true

this instruction was not given while setting up. I am not accessing Rasa from api. I am just bringing up the rasa and it is error like this

thank you for your help.

@muthukumars, you need to register it with socket.io channel, if you want to use the RASA Webchat :slight_smile:

@muthukumars, it’s given here:

Jitesh

thank you. but I am not access the rasa serve for now. I am just bringing up and the error shows up. I understand that this socket.io is needed if I need to be accessing from slack or web or something of that sort. anyway, I have included socket.io in the credentials.yml and the error still is appearing. I changed in credentials.yml (not in config.yml. sorry for the typo in my previous posting)

My further findings.

When I do Rasa Interactive, and add some greet and save it. then rasa train, it is saving the model as below

2020-03-28 09:43:34 INFO rasa.nlu.selectors.response_selector - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents. 2020-03-28 09:43:34 INFO rasa.nlu.model - Finished training component. 2020-03-28 09:43:35 INFO rasa.nlu.model - Successfully saved model into ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpltnqweqz/nlu’ NLU model training completed. Your Rasa model is trained and saved at ‘/Users/m.srinivasan/muthukumar/rasa/projects/Rasa-Init-Yes-Train-InitialModel/models/20200328-094335.tar.gz’. (rasa-venv) m.srinivasan@ATTACHCREDITTONE Rasa-Init-Yes-Train-InitialModel %

However, when I start the Rasa using “Rasa run”, it is not using the same /var/folders. in fact, I have new model saved. so I am assuming that it is new model with my new trained data and Rasa will use latest Model file in the model folder. however, when we start the rasa server, it is no loading the model into var/folders. there must be some setup that I would have missed.

I have further removed all the entire virtual environment. rebuilt a new virtual environment. I still see this error

2020-03-28 18:19:53 DEBUG rasa.utils.tensorflow.models - Loading the model … 2020-03-28 18:19:54 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2020-03-28 18:19:54 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph… 2020-03-28 18:19:58 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph. 2020-03-28 18:19:58 DEBUG rasa.nlu.classifiers.diet_classifier - Failed to load model. Maybe the path ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmp2a6duyy0/nlu’ doesn’t exist? 2020-03-28 18:19:58 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.

Not sure whether this is anything serious. I see this only when I do -vv (verbose)

Hey @muthukumars, can you tell where’s the error, what error actually are you facing since I can’t see any error in the logs.

Please see the fifth line and is as below

""DEBUG rasa.nlu.classifiers.diet_classifier - Failed to load model. Maybe the path ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmp2a6duyy0/nlu’ doesn’t exist? 2020-03-28 “”

hey @muthukumars, I was able to reproduce the same error, so below are my findings:

  • If you see the highlighted part in yellow color: here it first unzipped the models to the temp folder of my system.
  • when I copied the path of the temp folder I was able to see the unzipped models but suddenly the unzipped folder was deleted
  • since those folders were deleted the server didn’t found any trained nlu model folder of DIET classifier, it threw the error rasa.nlu.classifiers.diet_classifier - Failed to load model
  • now if you see the highlighted part in red color, here it has again unzipped the entire trained model to the temp folder

So what I am trying to say is the temp folder of the trained model gets deleted automatically before the DIET classifier is about to load due to which it doesn’t find the trained model path properly and it throws the error.

Jitesh

thank you for testing it

Yes. agreed. Question is : will this affect any while access or training the model? Is the above error benign and acceptable ?

This won’t affect the training of the model but it will affect while trying to access the model as it won’t predict the intent and entity using DIET classifier.

Jitesh

Is this a bug ?. How do we fix this ?. Are there any work around ?

thank you Muthukumar

hey @muthukumars, sorry for the late reply :sweat_smile:. Actually I was trying to find workaround but then I found out something which I would like to share:

  • Since DIET classifier was threw a error that no model found, but still I was able to get the intent prediction and I didn’t had any other classifier other than the DIET classifier
  • So I wanted to know how the DIET classifier was really being used although it was throwing the error, so what I did is I added some custom entity in my training data:

image

  • and then when I tested it out it was able to predict the entity using the DIET classifier

So as now of I didn’t found a fix for this but I see though it’s throwing the error for DIET classifier but still DIET classifier is being used for intent & entity classification.

Jitesh…

I have separate thread going on with Stephen for this. Please check this as well Rasa.nlu.classifiers.diet_classifier

this error is pretty consistent.

Please let me know

Additional Information:

When I do “rasa train”, I can see as below

2020-03-30 00:14:31 INFO rasa.nlu.model - Finished training component. 2020-03-30 00:14:31 INFO rasa.nlu.model - Starting to train component ResponseSelector 2020-03-30 00:14:31 INFO rasa.nlu.selectors.response_selector - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents. 2020-03-30 00:14:31 INFO rasa.nlu.model - Finished training component. 2020-03-30 00:14:32 INFO rasa.nlu.model - Successfully saved model into ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpvqka562r/nlu’ NLU model training completed. Your Rasa model is trained and saved at ‘/Users/m.srinivasan/muthukumar/rasa/Rasa-Virtual-Env/models/20200330-001432.tar.gz’. (Rasa-Virtual-Env) m.srinivasan@ATTACHCREDITTONE Rasa-Virtual-Env %

However, when I do rasa run -vv , it is not using the extracted saved NLU in temp folder and is erring out .

2020-03-30 00:14:48 INFO root - Enabling coroutine debugging. Loop id 140591057928216. 2020-03-30 00:14:49 DEBUG rasa.model - Extracted model to ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmp0453afuu’. 2020-03-30 00:14:49 DEBUG rasa.utils.tensorflow.models - Loading the model … 2020-03-30 00:14:50 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2020-03-30 00:14:50 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph… 2020-03-30 00:14:54 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph. 2020-03-30 00:14:54 DEBUG rasa.nlu.classifiers.diet_classifier - Failed to load model. Maybe the path ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmp0453afuu/nlu’ doesn’t exist? 2020-03-30 00:14:54 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore. 2020-03-30 00:14:54 DEBUG rasa.core.lock_store - Connected to lock store ‘InMemoryLockStore’. 2020-03-30 00:14:54 DEBUG rasa.model - Extracted model to ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpnh7ll9r3’. 2020-03-30 00:14:54 DEBUG pykwalify.compat - Using yaml library: /Users/m.srinivasan/.pyenv/versions/3.7.2/lib/python3.7/site-packages/ruamel/yaml/ init .py

That’s what I explained here.

1 Like

Are you facing any issues in intent prediction?