rasa: Make error message about too few training examples more informative
Description of Problem:
The message about too few core training examples doesn’t inform of what kind of training example is needed (i.e. more intent phrasings or more stories containing the intent). It also doesn’t help that the message appears right after Training NLU model... giving the impression that this is about nlu data.
UserWarning: Intent 'out_of_scope' has only 1 training examples! Minimum is 2, training may fail.
Overview of the Solution:
One way to make this better would be to explicit what kind of training example is meant:
UserWarning: Intent '{intent}' is present in only one story! Minimum is 2, training may fail.
Alternatively, raise the warning only after Training Core model... which would also help put the warning in context.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (14 by maintainers)
That would be dope! 💯
@wochinge are you suggesting I should create a test for
split_nlu_examples? There’s not currently one. Otherwise,test_train_test_splitpasses after the change tonlu_examplesinnumber_of_examples_per_intent. I also created a test fornumber_of_examples_per_intentthat passes (and fails before the change).If I do
Find usagesin Pycharm it show me the following usages ofnumber_of_examples_per_intent:print_stats-> Finesplit_nlu_examples-> Seems your fix would also fix this as the method name already suggests “split NLU examples”validate-> That’s the one you want to fixtest_train_test_split-> A test forsplit_nlu_exampleswhich would need adaptingHi @Ghostvv I discussed with Joe that a possible solution would be to replace
number_of_examples_per_intentinTrainingData.validatemethod with a different function that counts only nlu training examples. Would this create any inconsistencies with other parts of the code base that usesnumber_of_examples_per_intent?