Is there any built-in method to oversample minority classes?

Yes, I too discovered that fastai now has integrated the Oversampling callback, and I am using it instead. Here is a thread with more information and example usage :