Which actions.py file is used, the one on github or one on virtual server?

Hi, I’m a bit confused about which actions.py file is ran, I have one on Github repository which is connected to Rasa X, I also have one that’s in my virtual server (that hosts Rasa X) located in /etc/rasa/actions/actions.py following this guide. I’m uncertain which one is used, either way I tried running rasa run actions on my server’s console and the actions and formaction got registered, but when I test the bot using interactive mode on Rasa X, the action_ showed up but nothing happened. I’m unsure what might have gone wrong, any suggestions on what I should double check? (Runs fine locally on my machine)

Update: Ok, after I check the docker-compose logs, it complains about pandas module not found for some reasons, although I did install pandas.

Update 2: Ok I managed to overcome the missing pandas module problem. Currently it’s saying no registered action found.

Update 3: I was able to get the custom actions working, but I still like to know a quick answer to the title question.

An additional question, in one of the action I write to a csv file, locally this results in creating a csv file in my project folder. How does it work when it comes to Rasa X? Does it create a csv file on Github, or on the virtual server e.g. /etc/rasa/? Because currently I don’t find this file in either of these places.

The action server image pointed to on your server is the one that is run. How did you deploy your bot? Using docker compose or kubernetes?

How you transfer what you have in github to your server is up to you; it’s recommended to build an action image as part of a CI/CD pipeline.

I use docker compose following this guide yeah. So in this case in my Dockerfile I have COPY ./actions /app/actions, and the actions folder that’s being copied is from Github or?

See this section of the guide.

Wherever/whenever you build your action image, that is when the actions folder will be copied into the image. If this is done as part of a CI/CD pipeline, then it would be (probably) whatever is in the master branch of your repo. If you build it yourself, either on the server, or on your machine, it will use whatever is in the directory you are in.

Alright thanks for the clarification, I built it on server then it was the file on server that’s being used then, I’m okay with it in this use case but will look into CI/CD anyways.

Also can you tell me about writing to file, one of my actions is supposed to write intent to a csv file, it functions locally but when using Rasa X I can’t find the csv file in the project folder, so I’m unsure if it wasn’t created or was created in another location.

Since it’s running as a docker container on the server, you’ll need to mount the file/directory that you want it to write into. If you went in to the running container, you should be able to see the file, but to access it from outside you need to mount it.

To see if it is there, you can get into the container with

sudo docker-compose exec app /bin/bash

Then you can see what files have been written into the container

Thanks, with the command I was able to see the output file in there!

Hi, I had the same question. I created the the actions.py according to the guide. And right now rasax is using that file. How do I make rasax use the actions.py on github?

Thanks in advance.

As described above

The action server image pointed to on your server is the one that is run. How you transfer what you have in github to your server is up to you; it’s recommended to build an action image as part of a CI/CD pipeline .