Split : domain.yml - Rasa Open Source - Rasa Community Forum
👋 Introducing the Rasa Playground
Split : domain.yml
You have selected 0 posts.
2.7k views 11 likes 5 links
post by sten on Nov 7, 2019
Is there a plans to be able to divide the domain.yml the same way we can split the intent and stories in multiple .md files ?
What is this good for ?
the file will be less cluttered
it will be easy to switch on/off big portions of train data
you can do incremental development of the bot
easy to import data from other people
name collisions : you should think of allowing hierarchical IDs
f.e. : ## intent: banter.greet ; ## intent: greet.greet
OR automatically prepend based on the directory
+base - domain.yaml, nlu.md, stories.md
+prod- domain.yaml, *.md's
+new- .... test data
+banter - ...
+greet
+ ...
rasa train --data=base,prod,new
2.7k views 11 likes 5 links
post by jonathanpwheat on Nov 8, 2019
Hi @sten,
I hacked together a way to do this. It is not ideal, but works pretty well, for me at least.
In a similar fashion, you can create a data/domain directory and split your files up.
Then run my script right before you train and it will merge together all of those files into a single domain.yml file
The script is here - Rasa domain Assembler · GitHub
I just added this into a script I run whenever I train.
Hope that helps until it is a feature of Rasa.
post by sten on Nov 8, 2019
thanks … hiyapyco - cool…
i searched for yaml&markdown lib and there was none that you can use to manipulate the structure in python …
it seems also the markdown parser the rasa uses, doesn’t support multi-lines like this :
markdown-multiline
post by sten on Nov 10, 2019
I just also figured out I can use C/C++ preprocessor
cpp -P included.inc > output.file
post by jonathanpwheat on Nov 11, 2019
interesting, I haven’t had any problems with multi line entries, at least not yet, and I have quite a few
post by erohmensing on Nov 11, 2019
@jonathanpwheat you might be interested in the experimental MultiProjectImporter: Training Data Importers
1 year later
post by snek on Mar 11, 2021
Maybe this thread is a bit stale now but I stumbled across it while searching for a way to divide the domain file. It is now possible.
Multiple Domain Files
The domain can be defined as a single YAML file or split across multiple files in a directory. When split across multiple files, the domain contents will be read and automatically merged together.
Using the command line interface, you can train a model with split domain files by running:
rasa train --domain path_to_domain_directory