Rasa.nlu.classifiers.diet_classifier

I am new to Rasa. starting my rasa server using

rasa run -m /models/xxxx.tar.gz -vv, it gives me as below

2020-03-27 17:55:01 INFO     root  - Starting Rasa server on http://localhost:5005
2020-03-27 17:55:01 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2020-03-27 17:55:01 INFO     root  - Enabling coroutine debugging. Loop id 140271753592856.
2020-03-27 17:55:01 DEBUG    rasa.model  - Extracted model to '/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpyzr152t_'.
2020-03-27 17:55:01 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-03-27 17:55:02 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-03-27 17:55:02 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-03-27 17:55:06 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-03-27 17:55:06 DEBUG    rasa.nlu.classifiers.diet_classifier  - Failed to load model. Maybe the path '/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpyzr152t_/nlu' doesn't exist?
2020-03-27 17:55:06 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2020-03-27 17:55:06 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2020-03-27 17:55:06 DEBUG    rasa.model  - Extracted model to '/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmp4m_bgbxa'.

Any help as to why this is

I deleted the project and recreated it. the issue is still same

2020-03-27 19:54:19 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph. 2020-03-27 19:54:19 DEBUG rasa.nlu.classifiers.diet_classifier - Failed to load model. Maybe the path ‘/var/folders/rm/1jyknqjs6n172n8w_njg4lrh0000gp/T/tmpjdrj_1hi/nlu’ doesn’t exist?

Hi Muthukumar,

Welcome to the forum. Please use ``` to bracket log messages so they are more readable.

Did the rasa train run without errors?

Is there a reason you are specifying the -m option. Normally, it is not necessary and rasa will use the most recently generated model.

Greg

Stephen

thank you for responding. rasa train completed as below

(rasa-venv) m.srinivasan@ATTACHCREDITTONE Rasa-Init-Yes-Train-InitialModel % rasa train
Nothing changed. You can use the old model stored at '/Users/m.srinivasan/muthukumar/rasa/projects/Rasa-Init-Yes-Train-InitialModel/models/20200327-195305.tar.gz'.
(rasa-venv) m.srinivasan@ATTACHCREDITTONE Rasa-Init-Yes-Train-InitialModel %

Rasa commands suggested to use -m. so I was using it.

Stephen,if you can use with -m and model name, any new trained entities , can be trained directly into that model. this way, we do not have to restart the Rasa Server. - I have not yet tested it though.

What is your RASA_HOME directory? Unless your RASA_HOME is the root directory on your system, this command cannot be correct: rasa run -m /models/xxxx.tar.gz -vv.

From your rasa project home directory, you should run:

cd $RASA_HOME
rasa train
rasa run -vv

Stephen

  1. I did echo $RASA_HOME . - there was nothing set. then I set it to my home directory. - rasa run -vv - still errors as same as mentioned

  2. I did set the RASA_HOME to my main rasa directory .- still the same

  3. I set the RASA_HOMAE directory to my projects file directory. for e.g.

Did you face this problem when you install at your side sir?

My directory structure is as below

/home/muthukumar/rasa/rasa-venv (python virtual environment ). /home/muthukumar/rasa/rasa-projects/project1/ (Rasa Projects directory)

I set RASA_HOME=/home/muthukumar (this is not working and error is as same) I set RASA_HOME=/home/muthukumar/rasa-venv (this is not working and error is same) I set RASA_HOME=/home/muthukumar/rasa/rasa-projects/project1 (this is not working and error is same)

then ran rasa init from /home/muthukumar/rasa/rasa-venv/ - created projects under this folder. set RASA_HOME=/home/muthukumar/rasa/rasa-venv/ - the issue is same

Please suggest. I can delete all the virtual environment and create a new environment … (I have already done this once). but the situation is same and error is pretty consistent.

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

Stephen

any help ?

I’m running into the same problem with 1.9.3.

21544 -rw-rw-r-- 1 1000 1000 22060291 Apr  3 14:26 20200403-112618.tar.gz
2020-04-03 16:22:47 DEBUG    rasa.cli.utils  - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
2020-04-03 16:22:47 DEBUG    rasa.core.utils  - Available web server routes:
/conversations/<conversation_id>/messages          POST                           add_message
/conversations/<conversation_id>/tracker/events    POST                           append_events
/webhooks/rasa                                     GET                            custom_webhook_RasaChatInput.health
/webhooks/rasa/webhook                             POST                           custom_webhook_RasaChatInput.receive
/webhooks/rest                                     GET                            custom_webhook_RestInput.health
/webhooks/rest/webhook                             POST                           custom_webhook_RestInput.receive
/model/test/intents                                POST                           evaluate_intents
/model/test/stories                                POST                           evaluate_stories
/conversations/<conversation_id>/execute           POST                           execute_action
/domain                                            GET                            get_domain
/                                                  GET                            hello
/model                                             PUT                            load_model
/model/parse                                       POST                           parse
/conversations/<conversation_id>/predict           POST                           predict
/conversations/<conversation_id>/tracker/events    PUT                            replace_events
/conversations/<conversation_id>/story             GET                            retrieve_story
/conversations/<conversation_id>/tracker           GET                            retrieve_tracker
/status                                            GET                            status
/model/predict                                     POST                           tracker_predict
/model/train                                       POST                           train
/conversations/<conversation_id>/trigger_intent    POST                           trigger_intent
/model                                             DELETE                         unload_model
/version                                           GET                            version
2020-04-03 16:22:47 INFO     root  - Starting Rasa server on http://localhost:5005
2020-04-03 16:22:47 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2020-04-03 16:22:47 INFO     root  - Enabling coroutine debugging. Loop id 94605873961512.
2020-04-03 16:22:47 DEBUG    rasa.model  - Extracted model to '/tmp/tmpwuznn7ow'.
2020-04-03 16:22:48 INFO     rasa.nlu.components  - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-pt'.
2020-04-03 16:22:48 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-04-03 16:22:48.581280: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-04-03 16:22:49 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-04-03 16:22:49 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-04-03 16:22:52 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.

2020-04-03 16:22:52 DEBUG    rasa.nlu.classifiers.diet_classifier  - Failed to load model. Maybe the path '/tmp/tmpwuznn7ow/nlu' doesn't exist?

2020-04-03 16:22:52 DEBUG    rasa.core.tracker_store  - Connected to MongoTrackerStore.
2020-04-03 16:22:52 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2020-04-03 16:22:52 DEBUG    rasa.model  - Extracted model to '/tmp/tmpctqkom2i'.
2020-04-03 16:22:52 DEBUG    pykwalify.compat  - Using yaml library: /usr/local/lib/python3.6/site-packages/ruamel/yaml/__init__.py
2020-04-03 16:22:55 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-04-03 16:22:55 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-04-03 16:22:55 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-04-03 16:22:57 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-04-03 16:22:57 DEBUG    rasa.core.nlg.generator  - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.

I’m running inside a docker container.

Just did some digging, and updated to 1.9.5. The error message changed to

rasa.nlu.classifiers.diet_classifier  - Failed to load model for
'ResponseSelector'. Maybe you did not provide enough training
data and no model was trained or the path
'/tmp/tmptb8b9cbp/nlu' doesn't exist?

This is normal when the responses.md doesn’t existe as per explanation in Bug #5547

sir did u solved this error bcoz im geting the same error now can u help me sir

1 Like

If your Rasa project doesn’t have a responses.md file then remove ResponseSelector from your config.yml file.

1 Like

Thanks, that worked :slight_smile: