Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Updated director toxic classifier task #4701

Merged
merged 4 commits into from
Aug 18, 2022
Merged

Updated director toxic classifier task #4701

merged 4 commits into from
Aug 18, 2022

Conversation

leox1v
Copy link
Contributor

@leox1v leox1v commented Aug 2, 2022

Updated toxic classifier task for the director model:

  • now supports cpu-only evaluation (needed during multi-gpu training)
  • added additional flags to support truncation and limited number of examples
  • smaller fixes and adjustments

else:
self.classifier = shared['classifier']
print('Load the classifier from shared')
Copy link
Contributor

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(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def share(self):
shared = super().share()
shared['classifier'] = self.classifier
if self.classifier:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@klshuster
Copy link
Contributor

could you also rebase on main to see if your teacher tests pass?

@leox1v
Copy link
Contributor Author

leox1v commented Aug 16, 2022

could you also rebase on main to see if your teacher tests pass?

Done.

Copy link
Contributor

@klshuster klshuster left a 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

@klshuster klshuster merged commit a234541 into main Aug 18, 2022
@klshuster klshuster deleted the sigmoid_lm branch August 18, 2022 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants