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

ML policies with missing models causing ensemble not to load #7303

Closed
pheel opened this issue Nov 17, 2020 · 2 comments · Fixed by #7304
Closed

ML policies with missing models causing ensemble not to load #7303

pheel opened this issue Nov 17, 2020 · 2 comments · Fixed by #7304
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ml/policies Issues focused around rasa's dialogue management policies type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@pheel
Copy link
Contributor

pheel commented Nov 17, 2020

rules:
  - rule: Thank you
    steps:
      - intent: thankyou
      - action: utter_noworries
stories: []
policies:
  - name: TEDPolicy
  - name: RulePolicy

Since no stories are used, training results in log entry Can not train 'TEDPolicy'. No data was provided. Skipping training of the policy.

However, trying to load Core model after training is prevented by exception: Failed to load TED policy model. Path '/var/folders/80/5x0m20sn0bb_r7bg28b6lvt40000gn/T/tmp96oslq6_/core/policy_0_TEDPolicy' doesn't exist.

Ensemble could be allowed to load, minus any ML policies whose training was skipped.

Rasa version: 2.0.x

@pheel pheel added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Nov 17, 2020
@pheel pheel mentioned this issue Nov 17, 2020
4 tasks
@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @tttthomasssss 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 🤗

@shubhvachher
Copy link

shubhvachher commented Dec 28, 2020

Adding that this happens for more complex rule based systems as well. Just, without any stories to train upon.

Quick Fix is to comment out TEDPolicy from your config.yml before training and just rule policy trains on nlu, domain and rules. Further stack trace:

During training:

...
2020-12-28 17:05:30 ERROR    rasa.core.policies.ted_policy  - Can not train 'TEDPolicy'. No data was provided. Skipping training of the policy.
...

Running rasa shell to test the model.

2020-12-28 17:46:55 INFO     root  - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2020-12-28 17:46:55 INFO     root  - Starting Rasa server on http://localhost:5005
2020-12-28 17:47:02 ERROR    rasa.core.agent  - Could not load model due to Failed to load TED policy model. Path 'C:\Users\USER\AppData\Local\Temp\tmp8w58l_23\core\policy_1_TEDPolicy' doesn't exist..
.\miniconda3\envs\rasa\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: The model at 'models' could not be loaded. Error: Failed to load TED policy model. Path 'C:\Users\USER\AppData\Local\Temp\tmp8w58l_23\core\policy_1_TEDPolicy' doesn't exist.   
.\miniconda3\envs\rasa\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: Agent could not be loaded with the provided 
configuration. Load default agent without any model.
2020-12-28 17:47:02 INFO     root  - Rasa server is up and running.
Bot loaded. Type a message and press enter (use '/stop' to exit): 
Your input ->  hi                                                                                                                    
.\miniconda3\envs\rasa\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: No policy ensemble or domain set. Skipping action prediction and execution.
  More info at https://rasa.com/docs/rasa/policies

@alwx alwx added the area:rasa-oss/ml/policies Issues focused around rasa's dialogue management policies label Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ml/policies Issues focused around rasa's dialogue management policies type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants