Rasa Advanced Deployment: Part 3(Git Connection)

DLMade
Analytics Vidhya
Published in
4 min readDec 20, 2020

--

Till now we learned about installing rasa in VM and scaling pods. Now let’s connect our chatbot with git so we can keep track of changes and sync rasa-x data with the git. So that rasa-x automatically updates data if it finds any changes in the master branch.

Here are the steps to connect the git repo with the Rasa-x.

Step 1: Fork https://github.com/RasaHQ/deployment-workshop-bot-1

Step 2: Navigate to your forked copy

Step 3: Copy the SSH URL from your GitHub repository

Step 4: Connect Integrated Version Control in Rasa X

4.a. Specify the branch you want to use as master

4.b. Check “Require users to add changes to a new branch”

4.c. Do step 5 first, then click on “Verify connection”

5. Copy/paste the Deploy Key in your GitHub repository settings

5.a. Check “Allow write access”

Once you click verify connection, you’ll see something like this in a few minutes. This means our git connection succeeded.

By connecting GitHub rasa will now sync data from our repo. We can verify this in rasa-x nlu data.

Now let’s train the chatbot. Before that, we will see the training process in logs so let’s start the logs.

Issue this command to see your pods name

kubectl -n my-namespace get pods

We have to run logs on rasa-worker pods. So issue this command with rasa-worker pods name.

kubectl -n my-namespace logs my-release-rasa-worker-7984cdb4fb-89j9g --follow --tail 20
  • my-release-rasa-worker-7984cdb4fb-89j9g is my rasa worker pod name.
  • — follow means it will sync with the new logs that come in the pod.
  • — tail 20 means it will show us the last 20 records of logs.

Now click the train button in rasa-x and navigate into logs to see the process of training

After the model is trained. We have to make the model active to interact with it. Navigate to the model section in rasa-x where you will find your models.

It will take some time to finish. When it will finish. You can see something like this.

Now our assistant is up so let’s can click on the talk to bot button to check how your new model is working.

Great, it’s working fine. So now whenever we make changes in the master branch of the repo which is connected to rasa-x, it will sync the new data. Then we can train the model on the new synced data, activate it, and talk with it.

That’s all for today in the series of advance deployment of the Rasa chatbot. Keep an eye on the series of this blog. Till then, Happy Coding!!!

References

If you like this post, HIT Buy me a coffee! Thanks for reading.

Your every small contribution will encourage me to create more content like this.

--

--

DLMade
Analytics Vidhya

Howdy & Welcome. I am a content creator, machine learning researcher, and consultant. consultancy: dlmadeblog@gmail.com