-
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
Making rasa data convert config
update config.yml
and data/rules.yml
correctly with Mapping Policy
#7984
Conversation
- When migrating the mapping policy we append the RulePolicy in config.yml even if new_rules are empty. - When migrating the model config, we create the rules.yml file even if it is empty.
- Changed the test expected output to include RulePolicy. - Adjusted the success message at the end of the migration. - Changed the criteria (to write in rules and config yaml file) to check also if policies list is not empty.
- In test `test_migrate_mapping_policy_to_rules` added the case of having only one policy (the Mapping Policy) and no rules.
- Small fix in the code quality - Added a changelog
Hey @alwx while checking the CI warnings, I bumped into this one : UserWarning: Found a rule-based policy in your pipeline but no rule-based training data. Please add rule-based stories to your training data or remove the rule-based policy ( So based on this warning I should not create a |
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.
So I kept this logic, to create during the MappingPolicy
migration an empty rules.yml
file and add a RulePolicy
in the config.yml
file even if it is not necessarily used.
But I also left the warning check (and the related test) as it is right now. So we will still have the following warnings raised :
- If there is a RulePolicy and no rule data, it raises a warning that we should add rule data.
- If there are rule data and no RulePolicy, it raises a warning that we should add the policy.
I think it is important to leave these warnings (I am actually referring to the first one) since it is something that the user should take note of.
Also, the success message now changes to the following :
-
if there is a MappingPolicy and no rules, the message is
"The migration generated 0 rules so no rules were added to 'data/rules.yml'." -
if there is a MappingPolicy and at least one rule, the message is
"The migration generated 1 rule which was added to 'data/rules.yml'."
Proposed changes in Mapping Policy & Model Config Migration:
MappingPolicy
we append theRulePolicy
inconfig.yml
even if new_rules are empty.rules.yml
file even if it is empty.Status (please check what you already did):
black
(please check Readme for instructions)