blurr icon indicating copy to clipboard operation
blurr copied to clipboard

Apply BaseModelWrapper inside of BaseModelCallback

Open DanteOz opened this issue 3 years ago • 2 comments

Wrap HuggingFace PreTrainedModel during before_fit() and after_fit() callback hooks. This eliminates the need to explicitly wrap the PreTrainedModel in the low level api.

Tasks:

  • [x] Wrap/unwrap model in BaseModelCallback
  • [x] Maintain backwards compatibility by checking if model is already wrapped.
  • [x] Ensure BaseModelCallback is first callback added when initializing Learner.

DanteOz avatar May 28 '22 23:05 DanteOz

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Looking at this today and tomorrow ... sorry for the delay :)

ohmeow avatar Jul 13 '22 01:07 ohmeow

Thanks much sir! Yah ... its being merged ... the miracle is happening :)

ohmeow avatar Aug 26 '22 18:08 ohmeow

Merged

ohmeow avatar Aug 26 '22 18:08 ohmeow