I have an issue with finding the .pkl file that is created when I export a model using .export()
I basically don’t know how to tell the method where I want the file while I’m using Google Colab, so I can find it and maybe download the file, etc. I’ve read this documentation but I’m looking for something used in Google Colab.
Change learn.path to be "" and try again (or if not, learn.dls.path). The exported learner is being saved to where the data is being downloaded, you need to change this before exporting
Your learner has an attribute learn.path and .export() saves the export.pkl at that path. If you check what print(learn.path) returns you should find it. You can also try
!mv {learn.path/'export.pkl'} .
from a notebooks cell, it moves it to the folder your notebook is in.
As mentioned, it’s an attribute of the learner and you can just set it with learn.path = some_path.
As @muellerzr suggests, you can change it to the empty string, but you have to make it a PosixPath first or .export is going to complain
learn.path = Path("")
makes all following learn.export() save to the folder your notebook is in .