Help: Can't load a downloaded pkl file

Hi Guys!

I trained my model for about 3 hours and I exported and downloaded the pkl file. But I can’t seem to load it into a learner.

I’ve downloaded the pkl file into kaggle and I used: learn = load_learner("../input/aptos-import/APTOS.pkl") to load it in.

But an error appears when I try to train it: /opt/conda/lib/python3.7/site-packages/fastprogress/ UserWarning: Your generator is empty. warn("Your generator is empty.")

Thanks! :slight_smile:

Can you show more code? Do you mean that you trained the model somewhere else and are trying to load it in a Kaggle Notebook now?

1 Like

I trained the model somewhere else and I’ve exported and downloaded the pkl.

Now I’ve imported the pkl into the Kaggle notebook through datasets. I’m trying to load the pkl onto the learner but it says it’s empty.

My code is just the imports for FastAI (upgraded to v2), loading the pkl, then fit_one_cycle

Thanks for helping! :slight_smile:

Found a related post which might give some more clue:

Have you tried first loading it inside a new, local notebook, to make sure that the problem really is because of Kaggle?