-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Rules states should not include the initial values of slots. #8161
Rules states should not include the initial values of slots. #8161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joejuzl, I know this bug was annoying to users and it's good to see it go.
I'm not familiar with all the code you've touched but the changes look good to me and I'm gonna trust the newly added test cases 🙂
docstring changes Co-authored-by: Sam Sucik <s.sucik@rasa.com>
docstring updates in unchanged code Co-authored-by: Sam Sucik <s.sucik@rasa.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concise change! 💯
It feels a bit brute force which made me wonder how an ideal solution could look like: One idea could be to have a SlotFeaturizer
interface with a specific implementation for the RulePolicy
's use case. The RulePolicy
would then pass that to the TrackerFeaturizer
which would than use that to featurize the slots. It's currently a bit unclear to me why we need tracker.past_states
if it just calls the Domain
🤷🏻 Just to be clear: I'm fine with the current solution but in my opinion we should refactor as soon as we start passing a second flag down the line.
Yep very good points. Having ways to featurize differently based on context would nice, but yeah let's see how it develops. |
Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
👍🏻 @samsucik Feel free to approve once you think Joe adressed all your changes. Engineering wise it's ready to go from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
* Rules states should not include the initial values of slots. * changelog entry * Apply suggestions from code review docstring changes Co-authored-by: Sam Sucik <s.sucik@rasa.com> * Apply suggestions from code review docstring updates in unchanged code Co-authored-by: Sam Sucik <s.sucik@rasa.com> * update tests * remove unnecessary listen action * Apply suggestions from code review Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com> * black Co-authored-by: Sam Sucik <s.sucik@rasa.com> Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
Proposed changes:
Fixes #7450
When calculating tracker states from rules we were including the initial value of slots.
This meant that the rule only matched when a slot had that initial value.
This change omits initial values of slots from the rule states.
Status (please check what you already did):
black
(please check Readme for instructions)