-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement save and load methods in DIET classifier #240
base: main
Are you sure you want to change the base?
Implement save and load methods in DIET classifier #240
Conversation
Coverage Report •
|
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.
LGTM with some minor issues
""" | ||
raise NotImplementedError("Rasa Diet") | ||
self._diet.persist() | ||
pipeline_path = os.path.join(self._model_path, "pipeline.pkl") |
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.
Maybe we could move "pipeline.pkl" to a global variable
), | ||
resource=self._def_resource, | ||
) | ||
pipeline_path = os.path.join(self._model_path, "pipeline.pkl") |
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.
Use a global variable here
@@ -298,4 +304,14 @@ def load_model(self, file_path: str) -> None: | |||
Raises: | |||
NotImplementedError: If not implemented in derived class. | |||
""" | |||
raise NotImplementedError | |||
self._diet = DIETClassifier.load( |
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 rename it to diet_classifier?
self.init_pipeline() | ||
try: | ||
self.load_model() | ||
self._processes_utterances: Dict[str, Any] = {} |
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.
What is this? Are these processed utterances? If yes, can we change the name?
Fixes #239