Closed humzaiqbal closed 2 years ago
This PR fixes a probelm with the LambaLR scheduler in which label models trained with it can't be serialized properly because it uses a lambda function which pickle doesn't save. I fixed it by changing the scheduler to be class based using this as reference https://stackoverflow.com/questions/52758051/how-to-save-lambdalr-scheduler-in-pytorch-with-lambda-function
https://github.com/snorkel-team/snorkel/issues/1658 Fixes # (issue)
I added a UT where I set a label model using this scheduler and ensured that now it can be saved
Need help on these? Just ask!
tox -e complex
tox -e spark
This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Description of proposed changes
This PR fixes a probelm with the LambaLR scheduler in which label models trained with it can't be serialized properly because it uses a lambda function which pickle doesn't save. I fixed it by changing the scheduler to be class based using this as reference https://stackoverflow.com/questions/52758051/how-to-save-lambdalr-scheduler-in-pytorch-with-lambda-function
Related issue(s)
https://github.com/snorkel-team/snorkel/issues/1658 Fixes # (issue)
Test plan
I added a UT where I set a label model using this scheduler and ensured that now it can be saved
Checklist
Need help on these? Just ask!
tox -e complex
and/ortox -e spark
if appropriate.