Error: 'Failed to load domain specification from '/vagrant/domain.yml'. File not found!'


I have been training and re-training rasa based chatbot successfully. I use rasa data validate prior to training and rasa test cross validation post training.

In the last training iteration, the data was all looking good and training also went well. There were no errors in the training log and the new model got created. I tested it manually and it functions perfectly.

However, when I ran rasa test cross validation, I got the below error:

Error: 'Failed to load domain specification from '/vagrant/domain.yml'. File not found!'

The folder structure I have is as follows:

  - data
  - domains
  - models
  - config.yml

The command I use for rasa data validate is:

rasa data validate -d ./application/domains --data ./application/data

The above rasa data validate command works fine and shows no errors or story conflicts.

The command I use for rasa test cross validation is:

rasa test nlu --nlu ./application/data -m ./application/models --config ./application/config.yml --cross-validation --folds 3

This is where i encountered the error.

I have looked at previous issues/tickets around this issue and checked my data as follows:

  1. I have multiple data and domain files. Checked each data and domain file for validity on yamlchecker and yaml lint. All files are in valid format.
  2. Checked for presence of duplicate intents.
  3. Checked for missed intents.

Please let me know what I am missing and what could be the probable cause for this error. and how do I fix this so I can run rasa test cross validation successfully and completely.

You’re not specifing the -d option in rasa test like you are in validate.

I tried doing that using the command:

rasa test nlu --nlu ./application/data -d ./application/domains --config ./application/config.yml --cross-validation --folds 3

and this is the error I see:

usage: rasa [-h] [--version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x,evaluate} ...
rasa: error: unrecognized arguments: -d ./application/domains

The rasa version I am using is 3.0.9

I also used rasa test -h to read the usage around the command. There is no argument defined to provide the path to domains for the rasa test command unlike rasa validate.

Is there any solution to this? How to successfully run rasa test if domain files are in a custom folder structure?

There may be an issue with the test command and a split domain. You might search the old github issues or new Jira system.