Callbacks in version 0.7

I am trying to run a code for which I want to use the SaveModelCallback functionality from fastai.callback, but it flags the following error:

ModuleNotFoundError: No module named ‘fastai.callbacks’

Essentially I want to be able to run the following piece of code in version 0.7:

can anyone help me with the workaround for it? Thank you!

Hey Shreya,

Are you using version 0.7 on purpose? That’s from 2 years ago, and not super relevant anymore since last year we had fastai v1 and this year we have fastai v2. If you’re not trying to maintain a legacy project or something like that, then I suggest you pick up the current version of fastai (v2) - it’s much nicer to work with in my opinion and since it’s actively developed and maintained it’s much easier to get support and help for it.

Hey Orendar,

Thank you for your response. I’m aware it’s not relevant anymore, I have to reproduce an old code which was originally written in fastai version 1.0.28. I have been trying to install v1.0.28 but it keeps throwing the following error:

I’ve tried looking it up but haven’t found any working solution to it yet.

The only versions that install are 0.7 and then directly 1.0.61. The code isn’t valid in version 1.0.61. For the former, most code ran but I need to save the model after certain epochs (because of google colab’s timing restrictions), hence the callback and onecycle problem.