Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeywordIntentClassifier overwride the result of DIETClassifier #11540

Closed
yijinsheng opened this issue Sep 1, 2022 · 1 comment
Closed

KeywordIntentClassifier overwride the result of DIETClassifier #11540

yijinsheng opened this issue Sep 1, 2022 · 1 comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@yijinsheng
Copy link

Rasa Open Source version

3.2.4

Rasa SDK version

No response

Python version

3.8

What operating system are you using?

OSX

What happened?

I add the KeywordIntentClassifier after DIETClassifier in my config.yml. when i post "good morning" , I expect rasa return
{"intent":"greet","confidence":0.99}. but I get {"intent":"null"}. so I check the code in KeywordIntentClassifier in line 123~132.

for message in messages:
            intent_name = self._map_keyword_to_intent(message.get(TEXT))

            confidence = 0.0 if intent_name is None else 1.0
            intent = {"name": intent_name, "confidence": confidence}

            if message.get(INTENT) is None or intent is not None:
                message.set(INTENT, intent, add_to_output=True)

        return messages

The intent_name here may be None ,but the intent here will never be None.so is it better to change it to

if message.get(INTENT) is None or intent_name is not None:

Command / Request

No response

Relevant log output

No response

@yijinsheng yijinsheng added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Sep 1, 2022
@ancalita
Copy link
Member

ancalita commented Sep 8, 2022

@yijinsheng This issue was fixed by PR #11542 which recently got merged. It will be released in the next rasa-oss micro release 3.2.x.

@ancalita ancalita closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants