The notebook runs fine, because the required ‘fastai.text’ python files are located in the same folder as the notebook (‘fastai/courses/dl2/fastai/text’).
But finetune_lm.py is in folder ‘fastai/courses/dl2/imdb_scripts’, and does not see the ‘fastai.text…’ files
based on my experience, you have to install
fastai==0.7.0
I think this must be done using pip.
the imdb_scripts code on github maybe deprecated
it doesn’t work with latest fastai