Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to use NLU from tmp folder #5547

Closed
muthukumars opened this issue Mar 31, 2020 · 7 comments
Closed

Failed to use NLU from tmp folder #5547

muthukumars opened this issue Mar 31, 2020 · 7 comments
Labels
type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@muthukumars
Copy link

muthukumars commented Mar 31, 2020

Problem definition:
When you do "rasa run --vv", it is extracting the model and unable to use the NLU. Please see below

rasa run -vv
2020-03-31 14:28:28 DEBUG    rasa.cli.utils  - Parameter 'endpoints' not set. Using default location 'endpoints.yml' instead.
2020-03-31 14:28:28 DEBUG    rasa.cli.utils  - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
2020-03-31 14:28:28 DEBUG    rasa.model  - Extracted model to '/tmp/tmp0lj2hcss'.
2020-03-31 14:28:28 DEBUG    sanic.root  - CORS: Configuring CORS with resources: {'/*': {'origins': [''], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': None, 'supports_credentials': True, 'max_age': None, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': {'/*': {'origins': ''}}, 'intercept_exceptions': True, 'always_send': True}}
2020-03-31 14:28:28 DEBUG    rasa.core.utils  - Available web server routes:
/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
/                                                  GET                            hello
2020-03-31 14:28:28 INFO     root  - Starting Rasa server on http://localhost:5005
2020-03-31 14:28:28 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2020-03-31 14:28:28 INFO     root  - Enabling coroutine debugging. Loop id 94906451405208.
2020-03-31 14:28:29 DEBUG    rasa.model  - Extracted model to '/tmp/tmpun92x01l'.
2020-03-31 14:28:29 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-03-31 14:28:29.260423: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-03-31 14:28:29 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-03-31 14:28:29 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-03-31 14:28:33 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-03-31 14:28:33 DEBUG    rasa.nlu.classifiers.diet_classifier  - Failed to load model. Maybe the path '/tmp/tmpun92x01l/nlu' doesn't exist?
2020-03-31 14:28:33 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2020-03-31 14:28:33 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2020-03-31 14:28:33 DEBUG    rasa.model  - Extracted model to '/tmp/tmpv2jkfne8'.
2020-03-31 14:28:33 DEBUG    pykwalify.compat  - Using yaml library: /home/muthukumar/rasa/venv372/lib/python3.7/site-packages/ruamel/yaml/__init__.py
2020-03-31 14:28:33 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-03-31 14:28:33 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-03-31 14:28:33 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-03-31 14:28:34 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-03-31 14:28:34 DEBUG    rasa.core.nlg.generator  - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.

a) I have tried this with MAC python virtual environment. same issue
b) I have tried this with virtual environment built in Vmware ubuntu, the issue is same.

I think this is a Bug.

@muthukumars muthukumars added the type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. label Mar 31, 2020
@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @tabergma will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@tabergma
Copy link
Contributor

tabergma commented Apr 1, 2020

What Rasa version are you using? How does you config look like?

When you do rasa shell nlu and enter a message, do you get any response?

@muthukumars
Copy link
Author

muthukumars commented Apr 1, 2020

Hi Tanja

thank you for responding.

  1. rasa version is 1.9.4
  2. rasa shell nlu is responding and when I enter Hi, it is coming back with intents, response_select etc
  3. my config is as below

Configuration for Rasa NLU.

https://rasa.com/docs/rasa/nlu/components/

language: en
pipeline:

  • name: WhitespaceTokenizer
  • name: RegexFeaturizer
  • name: LexicalSyntacticFeaturizer
  • name: CountVectorsFeaturizer
  • name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  • name: DIETClassifier
    epochs: 100
  • name: EntitySynonymMapper
  • name: ResponseSelector
    epochs: 100

Configuration for Rasa Core.

https://rasa.com/docs/rasa/core/policies/

policies:

  • name: MemoizationPolicy
  • name: TEDPolicy
    max_history: 5
    epochs: 100
  • name: MappingPolicy

@tabergma
Copy link
Contributor

tabergma commented Apr 1, 2020

The log message is not very accurate. Do you have data to train the ResponseSelector component? If not the log message just indicates, that you did not train a ResponseSelector and as no model for ResponseSelector exists it can also not load it. I will update the log message to include the actual component. As you mentioned rasa shell nlu processes messages and returns intents and entities (if present), you should be good to go.

@muthukumars
Copy link
Author

How to avoid this error ?. Is it possible that the error can cause other issues or these are just for information and benign?

@tabergma
Copy link
Contributor

tabergma commented Apr 2, 2020

If you don't have any response selector data, e.g. a response.md file, just remove ResponseSelector from your pipeline in your config.yml file. Retrain the model and if you then start Rasa via rasa run the error should not be there anymore.
However, the error is not really an error, it is more just an informative message that should not cause any other troubles. So you can basically ignore it.

@tabergma
Copy link
Contributor

tabergma commented Apr 3, 2020

I'll close this issue as it is not a bug and actually works as expected. We updated the log message to clarify it.

@tabergma tabergma closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants