Handle `ValueError` in `IntentMaxHistoryTrackerFeaturizer`
See original GitHub issueSentry Issue: RASA-OPEN-SOURCE-DPA
ValueError: ‘brewery_search_city’ is not in list (18 additional frame(s) were not displayed) … File “rasa\core\policies\policy.py”, line 197, in _featurize_for_training == SupportedData.ML_DATA, File “rasa\core\featurizers\tracker_featurizers.py”, line 391, in featurize_trackers label_ids = self._convert_labels_to_ids(trackers_as_labels, domain) File “rasa\core\featurizers\tracker_featurizers.py”, line 961, in _convert_labels_to_ids for tracker_intents in trackers_as_intents File “rasa\core\featurizers\tracker_featurizers.py”, line 961, in for tracker_intents in trackers_as_intents File “rasa\core\featurizers\tracker_featurizers.py”, line 960, in <span class="error">[domain.intents.index(intent) for intent in tracker_intents]</span>
Definition of Done
- add check if intent is in
domain.intents
; otherwise emitUserWarning
and raiseRasaException
or see below suggestion from @dakshvar22
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Exalate commented:
dakshvar22 commented:
@ancalita The error suggests that a training story consists of an intent which is not declared in the domain file. The proper fix for this will be to implement a check before policies are trained to verify that all intents from training stories are declared in the domain.
Exalate commented:
jupyterjazz commented:
Received another alert this week: RASA-OPEN-SOURCE-DPH Wondering if we should move this to inbox since it occurs so frequently