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

Check for missing MappingPolicy if triggers are defined #4147

Merged
merged 53 commits into from Aug 12, 2019

Conversation

msamogh
Copy link
Contributor

@msamogh msamogh commented Jul 31, 2019

Proposed changes:

Status (please check what you already did):

  • made PR ready for code review
  • added some tests for the functionality
  • updated the documentation
  • updated the changelog
  • reformat files using black (please check Readme for instructions)

@msamogh msamogh marked this pull request as ready for review July 31, 2019 16:21
@msamogh msamogh requested review from tmbo and wochinge July 31, 2019 16:21
@erohmensing
Copy link
Contributor

since /restart is handled my the mappingpolicy, maybe we should also warn during run if the bot received a /restart intent but doesn't have mapping policy

@msamogh
Copy link
Contributor Author

msamogh commented Jul 31, 2019

But that doesn't fall under things you can recognize during training time, right?

@erohmensing
Copy link
Contributor

erohmensing commented Aug 1, 2019

Yes that's true, we would have to handle it in run, there isn't a way to pre-warn. Was just an idea to give people more information about why the bot wasn't responding as expected, but perhaps oos of this PR

@msamogh
Copy link
Contributor Author

msamogh commented Aug 1, 2019

@erohmensing Agreed. Although, I feel it'd be nicer if something as special as /restart was handled regardless of what policies are present.

Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality looks great! I would just do a few improvements to the location of the methods and then we are ready to go.

rasa/core/agent.py Outdated Show resolved Hide resolved
rasa/core/agent.py Outdated Show resolved Hide resolved
tests/core/test_agent.py Outdated Show resolved Hide resolved
tests/core/conftest.py Outdated Show resolved Hide resolved
@msamogh msamogh requested a review from wochinge August 6, 2019 11:14
Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great iteration! Looks really good now, couple of comments still

rasa/core/agent.py Outdated Show resolved Hide resolved
rasa/core/domain.py Outdated Show resolved Hide resolved
rasa/core/policies/ensemble.py Outdated Show resolved Hide resolved
rasa/core/policies/ensemble.py Outdated Show resolved Hide resolved
rasa/core/policies/form_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/mapping_policy.py Outdated Show resolved Hide resolved
tests/core/test_agent.py Show resolved Hide resolved
rasa/core/policies/ensemble.py Outdated Show resolved Hide resolved
rasa/core/policies/form_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/mapping_policy.py Show resolved Hide resolved
rasa/core/domain.py Show resolved Hide resolved
rasa/core/policies/ensemble.py Outdated Show resolved Hide resolved
rasa/core/policies/mapping_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/two_stage_fallback.py Outdated Show resolved Hide resolved
@msamogh msamogh requested a review from wochinge August 10, 2019 23:13
Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now! Also cool that you pulled it out of the agent module 🥇

rasa/core/domain.py Outdated Show resolved Hide resolved
rasa/core/domain.py Outdated Show resolved Hide resolved
rasa/core/policies/form_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/form_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/mapping_policy.py Outdated Show resolved Hide resolved
rasa/core/policies/two_stage_fallback.py Outdated Show resolved Hide resolved
rasa/core/policies/two_stage_fallback.py Outdated Show resolved Hide resolved
tests/core/test_agent.py Show resolved Hide resolved
msamogh and others added 8 commits August 12, 2019 09:19
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
@msamogh msamogh merged commit 78001f2 into master Aug 12, 2019
@msamogh msamogh deleted the warn-missing-policy branch August 12, 2019 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants