Rasa X overwrites domain, deleting lines of code in the process

Hello,

I’ve been having an issue with Rasa X for a while because it seems to automatically overwrite the domain file in unexpected ways whenever I use it.

Just now, I had an unrelated issue where the “rasa train” command was not recognizing my domain.yml file at all and said that it was empty (this occurred after upgrading from Rasa 2.0.2, before which it had been working fine).

Assuming it must be a formatting issue, I commented out almost every line of code to make the bot very rudimentary and then started incrementally uncommenting lines and retraining the model to isolate the issue (because both yamlchecker and yamllint stated that everything was valid YAML).

After “rasa train” starting functioning correctly again, I was checking the chatbot’s functionality with “rasa shell” and had no problems. However, on my last check I decided to use Rasa X to try out the CDD approach.

I opened the domain file within the Rasa X interface to see what I should try uncommenting next, but noticed that there were actually no commented lines at all. So I didn’t edit it, and decided to just check the file in the text editor on my computer instead.

Once I opened the file, I realized that every single commented line of code in the domain.yml file had disappeared in the process, which was the equivalent of approximately 200 lines of code. It seems that the file was automatically overwritten by the version opened in Rasa X, which deleted everything it identified as a comment.

Fortunately I have a backup of the file, but it’s still a bit frustrating. Is this a potential bug, or did I use Rasa X incorrectly?

Hi @shanelle, this is definitely not your fault. There are some improvements coming up in Rasa X 0.35 regarding reading and writing the domain file, but there’s currently no good support for comments. Could you, please, create an issue on GitHub to help us tackle this? In the issue, please also point to this thread for reference.

Hi. Deletion of comments is still an issue. Is there some work going on this?

Hey @shalabhsingh, as far as I can see, we know about this but haven’t jumped on it just yet because of other priorities. Feedback like this might make us re-consider the priorities, though, so thanks for asking!

Hi @SamS thanks for your prompt reply.

As you emphasized the importance of feedback, I thought I will add my view on this. Adding here to what shanelle said above, comments also help people working in a team to collaborate effectively. As the training data increases, it’s helpful to write descriptions for stories as comments or in general add comments between stories to understand the data better. Without comments it starts feeling like a code with no comments at all (which I am sure you agree is difficult to work with). The data in general becomes difficult to manage as more people start collaborating on it or if the data size starts increasing. Rasa X helps a bit in understanding things better but I am sure comments will help a lot as well. :grinning:

That being said, I am a fan of what team Rasa has built. It’s a phenomenal framework to work with. Thanks a lot.

1 Like