Rasa_nlu server for RASA Talk: rasa_nlu train Training Exception Can not train an empty pipeline

Hello everyone, I am new to the RASA Stack and have downloaded a GitHub project created by jackdh called RASA Talk, based on Rasa_nlu, React, and Mongodb. Here’s the link to it:

After setting up my rasa_nlu file (based on the rasa starter pack), and connecting the NLU backend with the project, I was unable to train my model after adding intents, utterances, and entities. The NLU server keeps throwing the following error every time I try to train a model:

" rasa_nlu.data_router - [Failure instance: Traceback (failure with no frames): <class ‘rasa_nlu.train.TrainingException’>: Can not train an empty pipeline. Make sure to specify a proper pipeline in the configuration using the pipeline key.The backend configuration key is NOT supported anymore. "

On my NLU project, I have the following nlu_config.yml file:

language: "en"

pipeline: "spacy_sklearn"

So my pipeline should be set up, especially that I did use it to train a model before setting a project as a server.

image

I also get the following in the console:

image

Has anyone else ever encountered this error ? Thank you!

If it is linked to particular project, i suggest you create an issue in the repo of the user since he is best suited to answer your query

Thank you, I have done that. But I also wanted to know if anyone from the RASA community has encountered a similar empty pipeline error, just in case it could be insightful.

It could be possible, that the script you are using from the code of the above may need more information regarding the path for your config.

how are you training the model? what is the command used

Hello @souvikg10 After communicating with the project’s creator, it appears that this is indeed a Rasa NLU problem:

This is what my http://localhost:5000/status shows : { "max_training_processes": 1, "current_training_processes": 0, "available_projects": { "default": { "status": "ready", "current_training_processes": 0, "available_models": [ "fallback" ], "loaded_models": [ "fallback" ] } } } I guess the problem comes from it saying "available_models": [ "fallback" ]

What I’m using to start my NLU server are the commands:

Using a MakeFile, I start with make train-nlu which is

python -m rasa_nlu.train -c nlu_config.yml --data data/nlu_data.md -o models --fixed_model_name nlu --project current --verbose

And then I’ve added the make serve command :

python -m rasa_nlu.server --path projects

Here’s what happens when I run the training command:

You have the path of the models, is it same path that is mounted when you try the API?

simply curl localhost:5000/status | python -mjson.tool

Do you see what models are available? it may be related to the path you have provided given from where you are starting the server

@souvikg10 thank you for your answer. The path I give in the --path parameter is the same one I cd into when I start the server. The models I try to train show up this way when I use curl localhost:5000/status | python -mjson.tool


              "status": "failed",

              "error_message": "[Failure instance: Traceback (failure with no frames): <class 'rasa_nlu.train.TrainingException'>: <TrainingException instance at 0x18a5bacc228 with str error:\n Traceback (most recent call last):\n  File \"C:\\Users\\Asus\\Anaconda3\\envs\\py\\lib\\site-packages\\twisted\\python\\reflect.py\", line 448, in safe_str\n    return str(o)\nTypeError: __str__ returned non-string (type int)\n>\n]",
              "current_training_processes": 0,

              "available_models": [
                  "fallback"
              ],

              "loaded_models": [
                  "fallback"
              ]
          }

I tried with both the tensorflow_embedding pipeline and the spacy-sklearn pipeline.

For the nlu server, path is the one where you have the projects

path/project/models