Closed jupyterjazz closed 3 years ago
Tried to reproduce the issue using the latest 2.8.x. with your config
language: en
pipeline:
- name: WhitespaceTokenizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: DIETClassifier
epochs: 25
- name: ResponseSelector
epochs: 25
- name: EntitySynonymMapper
policies:
- name: MemoizationPolicy
max_history: 5
- name: TEDPolicy
max_history: 5
epochs: 50
- name: RulePolicy
with / without retrieval_intent : chitchat
and the data for the example/responseselectorbot
. But it works fine :/ Am I missing something there?
Since the issue came up with the main
branch and not 2.8.6
- Can you reproduce the issue on the current 2.8.x? Meanwhile, I'll try main :)
@ka-bu, works fine on the 2.8.x branch.
On the 2.8.x branch, it's fixed because available response selector intents are only those who have their own response selectors.
https://github.com/RasaHQ/rasa/blob/5420b848b9da006164dbea19cde2668d3fb5f72e/rasa/nlu/test.py#L1264
This is incorrectly calculated in the current main.
https://github.com/RasaHQ/rasa/blob/954107f4c6e84e506d387b65dc978452421e2acd/rasa/nlu/test.py#L1282
Where it contains every retrieval intent disregarding if they have a separate response selector (in which case selector_key
would not be RESPONSE_SELECTOR_DEFAULT_INTENT
) or not.
Perfect, thanks for comparing and posting the findings :) Should be resolved on 2.8.7. Shall we close this issue then?
Rasa Open Source version
current main
Python version
3.7
What operating system are you using?
OSX
What happened?
This error shows up when I run
rasa test
for a model with a Response Selector.When a response selector output is created, the
selector_key
is assignedRESPONSE_SELECTOR_DEFAULT_INTENT
ifself.retrieval_intent
is None. https://github.com/RasaHQ/rasa/blob/954107f4c6e84e506d387b65dc978452421e2acd/rasa/nlu/selectors/_response_selector.py#L543However, during the evaluation of a response selector, when we need to extract value attached to the selector key, the key is chosen differently. https://github.com/RasaHQ/rasa/blob/954107f4c6e84e506d387b65dc978452421e2acd/rasa/nlu/test.py#L1286
More specifically, if the target intent is a retrieval intent, then the key becomes the target intent. This is wrong because the above-defined
selector_key
is stillRESPONSE_SELECTOR_DEFAULT_INTENT
.As a result, we can't extract predicted responses during the evaluation and we have this error.
I propose changing the logic behind determining this key https://github.com/RasaHQ/rasa/blob/954107f4c6e84e506d387b65dc978452421e2acd/rasa/nlu/test.py#L1286 which will need just a few lines.