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.