Object `learn.export()` not found

Hello!

I’m trying to save my model with learn.export() but no “'export.pkl” file was created in my current directory.

I tried running ?learn.export() to find out more about the function, but I got the following output:

Object learn.export() not found.

I pulled the latest fastai repo that I’m working in, and according to conda list, my fastai library is updated to the most recent version:

fastai 1.0.46.dev0 <pip>

Any ideas why I can’t find/use that function?

Thank you!

Use ?learn.export without the (). You can also use doc(learn.export) to take you to the fastai docs. The export.pkl file will be with your saved model files. Either at learn.path or learn.data.path depending on whether you specified a path for your learner.

I was having the error as well. Somehow, I update the fastai libraries (with conda install), reboot my laptop and it works.

Thanks for all your help! It was related to choosing the path for learn.export by setting it with learn.path. Afterward it worked as expected :slight_smile:

Hi
I am having the same problem with learn.export() not found.
AttributeError: 'Learner' object has no attribute 'export'
Also tried ?learn.export() -> Objectlearn.exportnot found.
i am having fastai version 1.0.34.
I think that’s not the latest one. i tried several time updating/installing fastai conda update fastai but it always gives this # All requested packages already installed.
Any suggestion please.
i am using crestle.ai and want to deploy a classification app as per the fastai course-v3 -> dl1 -> lesson2