-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Adapted memoization policies for graph #9383
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.
Can we please also adapt the unit tests to the new GraphComponent versions of the policy? 🙌🏻
@twerkmeister Can we please also adapt the unit tests to the new GraphComponent versions of the policies? 🙌🏻 |
|
should also fix #5786 |
@@ -123,6 +126,7 @@ def __init__( | |||
featurizer: Optional[TrackerFeaturizer] = None, | |||
) -> None: | |||
"""Constructs a new Policy object.""" | |||
self.config = config |
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.
?
self.config = config | |
self._config = config |
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.
alright
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.
@twerkmeister Seems this is still open?
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.
Yes indeed, I didn't do it here because it would mean another 100+ line changes because it would ripple through all the policies. In Ted policy alone there are like 50 accesses to self.config
. Let's do it in a focused, separate PR just after this to not clutter this one here?
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.
sounds good 👍🏻
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.
Nice job 👍 especially with all the tests 🚀
Just a couple of small suggestions.
Co-authored-by: Joe Juzl <joejuzl@gmail.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.
🚀 🚀 🚀
…https://github.com/RasaHQ/rasa into 3.0-architecture-revamp/9330/NLUTrainingDataProvider * '3.0-architecture-revamp/9330/NLUTrainingDataProvider' of https://github.com/RasaHQ/rasa: Ignore assessed vulnerabilities Adapted memoization policies for graph (#9383)
* Adapted memoization policies for graph * Not persisting config anymore for graph policy components * adjusted unit testing for memoization graph component * Removed max history hack in ted policy * Making sure policy config is used for initializing featurizers if necessary * Added policy priority to ted policy default config * Simplified policy test suites * Persisting policy by default when training * Only carrying over max_history from policy to featurizer for MaxHistoryTrackerFeaturizers * Turned load fail logging to warning from info * Removed compatibility code for old policy component types * Removed metadata and persist abstract methods from policy class * Joined all memoization policy tests * Fixed delorean code
Proposed changes:
MemoizationPolicy
andAugmentedMemoizationPolicy
to newGraphComponent
interface #9344important context: https://www.notion.so/rasa/Migrating-policies-to-the-new-model-architecture-819812d37d784e4d98347d74ea4844fc#369e558d39b74a5096081a0408c23665
Status (please check what you already did):
black
(please check Readme for instructions)