-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Updated director toxic classifier task #4701
Conversation
projects/director/tasks/safety.py
Outdated
else: | ||
self.classifier = shared['classifier'] | ||
print('Load the classifier from shared') |
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.
nit: can we use logging here?
import parlai.utils.logging as logging
logging.info(...)
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.
Done.
projects/director/tasks/safety.py
Outdated
|
||
def share(self): | ||
shared = super().share() | ||
shared['classifier'] = self.classifier | ||
if self.classifier: |
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.
are there instances where this is not instantiated?
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.
No. I removed it and added an assertion.
could you also rebase on main to see if your teacher tests pass? |
Done. |
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, failing tests are unrelated
Updated toxic classifier task for the director model: