Suggestions: Split domain.yml into multiple files, no deleting of comments

Dear Rasa-Team,

getting deeper into Rasa day by day, I have to suggestions, that would make my life a lot easier working with Rasa.

  1. I started splitting the nlu- and stories-files, according to my needs, as everything in one file get very confusing very fast. Would be great to have templates, responses and actions in separate files (or even in separate folders) too. I saw some handmade scripts from users as a workaround. But that isn’t ideal, to be honest. I mean, in almost every programming language separating code into different files - to make it understandable and maintainable - is highly recommended or even mandatory. Why not in Rasa?

  2. To not get confused, I complete my Rasa-files with a lot of comments. Then, after a rasa interactive command, Rasa reformatted all my files and deleted every comment. Too bad! Is this avoidable?

Rasa is fantastic! Thanks so much and keep up the excellent work

Greets form Munich

Burkhardt

2 Likes

Hi @axelschweiss! Thanks for the feedback. It’s nicely timed because right now we are thinking through the future of Rasa training data formats. I like the idea of making it more modular and respecting that modularity better and have shared your ideas with the team :slight_smile:

2 Likes

Agreed, we’re looking for this too! Any update?

Hi @tatianaf Until Rasa supports split domains, you can use a script I wrote. ( Rasa domain Assembler · GitHub )

Instructions:

Create a data/domain directory and split up your domain.yml file however you see fit in that directory. Place my script in the root of your project, and run it with

python build-domain.py

It will take the individual .ym files in /data/domain and merge them together nicely aligning up the various sections and produce one domain.yml file that can be used to train.

The trick here is to remember to run the script whenever you want to train. I’ve often forgotten to do that (and it’s my creation) then wondered why my changes were missing :slight_smile: I created an alias to run the assembly then train, haha

Let me know if that helps and if you have any questions.

2 Likes

that’s helpful thanks, ill check it out! The only thing is this wouldnt work with Rasa X UI right? Like if we link Rasa X UI to the github repo for the core and we make changes in the Rasa X UI, then the changes will get saved to the merged domain but not the individual domains

Ooo, yea, you’re correct, that would get messy quick.

I don’t use RasaX. When you add intents, etc in Rasa X does that actually write out to domain.yml and push back to the repo?

If that’s the case, then that would be a hot mess and probably not worth it.

If you only developed locally, you’d have to run the assembler, then commit/push the merged domain.yml file so Rasa X could consume it. As long as there wasn’t any building/tweaking via Rasa X it would work, but that’s a good portion of Rasa X’s functionality and purpose :-/

Now I’m curious to see how Rasa X saves data…

Yeah I’m a dev so I mostly use my code editor for making changes but we have some non-developers on the team that will be using the UI to make changes. The Rasa X UI is free and has some cool features if you want to check it out.

1 Like

I watched a couple videos about it, but haven’t tried it yet. Maybe I’ll give it a shot. It would be nice to have some of the non-developers be able to make edits. Now you have me thinking.

1 Like

:slight_smile:

2 Likes