Rasa: Training a new rasa model from http-api using example provided fails.

Created on 24 Nov 2020  Â·  7Comments  Â·  Source: RasaHQ/rasa

Rasa version:2.0.6

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version:3.8.5

Operating system (windows, osx, ...):osx

Issue: Using the http-api & example provided unable to train the model

Error (including full traceback):

2020-11-24 09:22:19 DEBUG    rasa.server  - Extracting JSON payload with Markdown training data from request body.
2020-11-24 09:22:19 DEBUG    rasa.server  - request payload is:{'domain': 'intents:\n  - greet\n  - goodbye\n  - affirm\n  - deny\n  - mood_great\n  - mood_unhappy\n\nresponses:\n  utter_greet:\n  - text: "Hey! How are you?"\n\n  utter_cheer_up:\n  - text: "Here is something to cheer you up:"\n    image: "https://i.imgur.com/nGF1K8f.jpg"\n\n  utter_did_that_help:\n  - text: "Did that help you?"\n\n  utter_happy:\n  - text: "Great carry on!"\n\n  utter_goodbye:\n  - text: "Bye"', 'config': 'language: en\npipeline: supervised_embeddings\npolicies:\n  - name: MemoizationPolicy\n  - name: TEDPolicy', 'nlu': '- intent: greet\n  examples: |\n    - hey\n    - hello\n    - hi\n\n- intent: goodbye\n  examples: |\n    - bye\n    - goodbye\n    - have a nice day\n    - see you\n\n- intent: affirm\n  examples: |\n    - yes\n    - indeed\n\n- intent: deny\n  examples: |\n    - no\n    - never\n\n- intent: mood_great\n  examples: |\n    - perfect\n    - very good\n    - great\n\n- intent: mood_unhappy\n  examples: |\n    - sad\n    - not good\n    - unhappy', 'responses': "chitchat/ask_name: - text: my name is Sara, Rasa's documentation bot! chitchat/ask_weather: - text: it's always sunny where I live", 'stories': '- story: happy path\n  steps:\n  - intent: greet\n  - action: utter_greet\n  - intent: mood_great\n  - action: utter_happy\n\n- story: sad path 1\n  steps:\n  - intent: greet\n  - action: utter_greet\n  - intent: mood_unhappy\n  - action: utter_cheer_up\n  - action: utter_did_that_help\n  - intent: affirm\n  - action: utter_happy\n\n- story: sad path 2\n  steps:\n  - intent: greet\n  - action: utter_greet\n  - intent: mood_unhappy\n  - action: utter_cheer_up\n  - action: utter_did_that_help\n  - intent: deny\n  - action: utter_goodbye\n\n- story: say goodbye\n  steps:\n  - intent: goodbye\n  - action: utter_goodbye', 'force': False, 'save_to_default_model_directory': True}
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/config.yml' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml' is 'rasa_yml'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/nlu.md' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/responses.md' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/stories.md' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/nlu.md' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/responses.md' is 'unk'.
2020-11-24 09:22:19 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/stories.md' is 'unk'.
2020-11-24 09:22:20 INFO     rasa.shared.utils.validation  - The 'version' key is missing in the training data file /var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml. Rasa Open Source will read the file as a version '2.0' file. See https://rasa.com/docs/rasa/training-data-format.
2020-11-24 09:22:20 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml' is 'rasa_yml'.
2020-11-24 09:22:20 INFO     rasa.shared.utils.validation  - The 'version' key is missing in the training data file /var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml. Rasa Open Source will read the file as a version '2.0' file. See https://rasa.com/docs/rasa/training-data-format.
2020-11-24 09:22:20 DEBUG    rasa.shared.importers.importer  - Added 0 training data examples from the story training data.
2020-11-24 09:22:20 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of '/var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml' is 'rasa_yml'.
2020-11-24 09:22:20 INFO     rasa.shared.utils.validation  - The 'version' key is missing in the training data file /var/folders/cp/1v9r04wd7mz63xtx_klyr9g40000gn/T/tmpguneyh_s/domain.yml. Rasa Open Source will read the file as a version '2.0' file. See https://rasa.com/docs/rasa/training-data-format.
No training data given. Please provide stories and NLU data in order to train a Rasa model using the '--data' argument.
2020-11-24 09:22:20 ERROR    rasa.server  - Ran training, but it finished without a trained model.

Command or request that led to error:


Content of configuration file (config.yml) (if relevant):


Content of domain file (domain.yml) (if relevant):


area type

Most helpful comment

All 7 comments

I am using Rasa version 2.1.1 and was able to temporarily solve the issue in my local environment thanks to @cr33dx's suggestion (waiting for an official fix of course :)
However, it seems the example provided in the http-api doc is not working anymore, so in order to perform a complete training (NLU + Core) I had to modify the payload to reflect the latest format of the training data files.

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

@federicotdn Could you please review this issue?

@roebius @cr33dx out of curiosity, why do you want to train through the HTTP API?

@tmbo I am prototyping a chatbot generator able to create/update a chatbot from a Python script. NLU data are scraped by the script from a web site. The Python script is preparing the training data and activating training through the HTTP API, in order to replace the active model of the deployed Rasa chatbot with the newly generated model.
I understand this can be entirely accomplished using CI/CD techniques, however, in this prototyping phase, I find using the API a little bit more agile.
Any comments/suggestions highly appreciated :blush:

@tmbo we have a faq maker ui where user can enter the question utterance and answer and using that we are training the nlu and core.
i asked question in forum about what should be the right way to train model on fly and did not get any response so i tried with http-api.

Was this page helpful?
0 / 5 - 0 ratings