Rasa X Model training not working

Hi all!

I’ve installed rasa x (0.23.3) on a ubuntu 18.4-Server, with plenty of power. It’s working. After installation there are no training data, responses, stories … and no model available. It’s a fresh install. So I started to input training data. After that, I train a model. When I press the “train”-button, a popup showing “Training” appears … and disappears after some seconds. But there is no model file under “models”, no matter how often I try to train. So I connected rasa x with a github-repository, which contains the directory of a local trained rasa x-instance. The connection works, rasa x somehow gets the training data (although there is no data-directory on the server). But again: Training fails! I am logged in as root on the server. I can change configuration without any problems. So I don’t think it is a write-permission problem. I tried to upload a model with curl. I get the response: “Internal Server Error. The server encountered an internal error and cannot complete your request”

Something is going wrong here …

Thanks for any help. Best regards

Burkhardt

Hi @axelschweiss,

I will try to help you figure out what is going on.

It is awesome you got rasa x connected with a github-repository. That is the way to go for developing a bot with rasa x. The fact that you do not see the training data files on disk is correct. Rasa X has a database in which it stores all the data that it pulls from your github repo.

We recently released rasa x 0.24.1, and I do recommend that you upgrade rasa x to that version. Several issues were fixed related to the git integration compared to your version 0.23.3.

When you upgrade, can you summarize what method you use to install rasa x, and keep track of any specific steps you have to take outside of the installation steps described in the docs?

Hi Arjaan, thank you for your answer.

I started an all new server (Ubuntu 18), installed rasa x with docker, connected it with my github-repo, everything worked fine. Training data is there, I can enter new training data … but the problem persists. Can’t train a model. When I want to talk to the bot (“interactive learning”), I get the message “There are no active models”. When I go to “conversations”, I get this popup “It seems like its your first time here …” - everytime I go there. I created a link for guest testers, entered some messages. But these messages never arrived at rasa x. Before I connected rasa x to my github repo, I got these “There was an error loading messages and polling has been stopped” message, when I clicked on “conversations”. That message has gone, when I connected rasa x to my github repo.

Best regards

… okay, it’s working now, but I don’t know exactly why.

What I did was:

  1. Select another V-Server-Provider. This should not make any difference. As on the previous provider, Ubuntu 18 was installed. With one slight difference …
  2. Docker wasn’t preinstalled with Ubuntu. That was the case with the previous provider. I have no idea if this really matters. But I wanted at least to leave this observation here in the forum. Maybe that could help someone in the future.

Now everything is working, although I had to restart Rasa x once to get the “interactive learning” working.

Greets

Burkhardt

Hi @axelschweiss,

Great to hear it is working.

What could have happened is that you had an older version of docker installed. Can you double check what version of python, docker and docker-compose you are using now?

$ python3 --version && docker -v && docker-compose -v

Colleagues,

I’m having this same problem. @Arjaan, what version of docker, docker-compose and python are required?

I have

Python 3.6.8

Docker version 19.03.5, build 633a0ea838

docker-compose version 1.25.4, build unknown

Also, when I try to import a model through the suggested curl method, I get the following error:

{“version”:“0.24.7”,“status”:“failure”,“message”:“Model version unsupported.”,“reason”:“ModelVersionError”,“details”:{},“help”:null,“code”:404}

Any help would be great!
BTW Rasa is great!

-B

Hi @bubjanes, Your python, docker, and docker compose versions are fine. Your issue is something else.

What is the version of your deployment? You can check it by typing this in the url bar of your browser: http://...hostname..../api/version

And what rasa version did you use to train the model you are trying to upload?

1 Like

Thank you for your response @Arjaan!

You were right! The problem was that I had a conflict with my versions. I’m still a little unclear about whether it is better to train inside docker or in the local machine but I see now that, if I have the version right the model import works.

Thanks again!

@bubjanes, great to hear. Thanks for confirming this was the issue.

I’m facing the same problem here. I was able to install the rasax by following Docker-Compose Manual Install . My GIT repo also is also connected and I’m able to see my data in the rasax. However, when I click on Train, I just see a pop up “Training Model” and it disappears without making one. So I uploaded a model using CURL command. But the bot doesn’t respond to my queries. It seems to be dead. I also have difficulty bringing up my actions server.

Environment details:

  • Red Hat Enterprise Linux Server release 7.7 (Maipo)
  • Python 3.6.8
  • Docker version 19.03.5, build 633a0ea838
  • docker-compose version 1.25.4, build 8d51620a

@bubjanes - what versions do you have for these apps?? @Arjaan - What am I missing here??

@ kiranlvs93 I could never get the “train” button to work either, so I just train on my local machine and then use the “upload model” CURL.

If you are doing this CURL and you do not receive an error in the console, perhaps it is functioning and you just aren’t seeing it. You can check first on the rasa X UI, under models, and also in the /models directory of the machine where this is running (be it a VM or a physical machine). In my experience, no response in the console from the CURL means success.

As far as my versions:

Rasa: 1.4.3 Rasa X: 0.25.2 Python 3.6.8 Docker version 19.03.6 docker-compose version 1.25.4

I don’t know if that helps at all, but good luck! -B

Thanks for the reply @bubjanes There was no error in the curl. Indeed, the model is uploaded to RASAX Server.

But when I log into the container to see if the model is actually working, I noticed that it is throwing an error: 2020-03-03 19:19:30 ERROR rasa.core.agent - Could not load model due to Failed to find module ‘rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer’. No module named ‘rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer’.

I got this working. There was issue with the docker-compose.override.yml file. Now the uploaded bot is functional. But the action server isn’t up and running due to this all my actions fail. Below are my docker containers running:

image

Issue with actions:

Exception when I input a msg that calls for actions:

rasa-production_1 | 2020-03-04 03:28:54 ERROR rasa.core.actions.action - Failed to run custom action ‘action_joke’. Couldn’t connect to the server at ‘http://10.65.139.65:5055/webhook. Is the server running? Error: Cannot connect to host 10.65.139.65:5055 ssl:default [Connection refused] rasa-production_1 | 2020-03-04 03:28:54 ERROR rasa.core.processor - Encountered an exception while running action ‘action_joke’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

Below are the files in my docker - actions-server rasa/rasa-sdk:latest (rasa_action_server_1)

My docker-compose.yml file:

image

image

Any help would be appreciated. I’m stuck here for 2 days.

@kiranlvs93
hmm this is a different issue and its hard to tell what’s going on. One thing I could say is that the actions server comes from the docker-compose.override.yml file, and not the docker-compose.yml. I’m not sure, but it sounds like you had yours in the latter.

Saluti! B

Hi @kiranlvs93,

The problem is that in your actions.py you import the python library requests and it is not available.

The requests python library is not included in the base rasa-sdk docker image, so you must create your own docker image by extending the base rasa-sdk image. How to do this is described in the docs section Adding Custom Dependencies

1 Like

I have the same problem. I can’t train rasa even with git connected and https enabled.

my local training config: {“rasa”: {“production”: “1.10.10”, “development”: “0.0.0”, “worker”: “1.10.10”}, “rasa-x”: “0.31.2”} + public key

my GCP training config: {“version”: “0.31.2”, “status”: “failure”, “message”: “See the server logs for more information.”, “reason”: "The server encountered an internal error and cannot complete the request . “,” details “: {},” help “: null,” code ": 500}

Facing the same problem, any help ?

Hello guys, Am facing a similar problem. I tried training and uploading the model to my rasa-X server and it failed. Tried to update my model but the train failed again. Here is a screenshot of my rasa-X version. Please advise.