Lesson 1 error during NLP training: NameError: name 'getcallable' is not defined

Hi, I’m running into an error when trying to run this cell in lesson 1 on kaggle:

from fastai.text.all import *

dls = TextDataLoaders.from_folder(untar_data(URLs.IMDB), valid='test', bs=32)
learn = text_classifier_learner(dls, AWD_LSTM, drop_mult=0.5, metrics=accuracy)
learn.fine_tune(2, 1e-2)

I’m receiving this error:
NameError: name 'getcallable' is not defined

Does anyone know what’s causing this issue?

This notebook works for me on Kaggle. You have probably made a mistake editing the notebook you are working with.

Restart from the begining. Don’t change anything. Run all of the cells. Pay attention to any cells that fail to run and address the issue then.

How did you get Lesson 1 loaded? Go back and make sure you have a known-good source for your code. Import it yourself if you have to.

File → Import notebook. Select the source is GitHub. Repository fastai/fastbook. Folder clean/01_intro.ipynb.

1 Like

Aha you’re right, I made a few changes to the notebook, after reverting back to the original notebook the issue is resolved. Thanks @maueroats !

1 Like