I am running a Jupyter notebook on Paperspace Gradient.
I’ve run many of the notebooks from the Practical Deep Learning for coders and all seems fine there. I guess the fastai library is already loaded in the environment that I chose with Gradient.
I just pulled the notebooks from the NLP course that Rachael taught and tried to run one of those but got an error early on. the line that generated the error is an import of utils.mem
from fastai.utils.mem import GPUMemTrace #call with mtrace
I suspect this has to do with the version of the fastai library.
version 2 is on the machine I am using and maybe the course used version 1.
Any suggestions on what I can do here?
Hey @jhmuller have you checked out this? Major new changes and features. They talk about what you can do to fix the problem there. In case you are having issues with the new fastbook as well, please use git pull to update your notebooks.
I think this was related to installing fastai. I thought that some problems would be solved by looking at the link above. However, the docs are great resource to refer to if you are having trouble. See here. Also, exporting your conda environment removing could help me or someone else in the forum to help you further. How to export environment
Thanks @radikubwa, I’ve reviewed the docs and links and unfortunately I still have the same issue when I rebuild my docker image. There doesn’t appear to be anything standing out other than the fact that module appears to be missing.
Doing a search of the github it appears utils.py is missing from fastai, it may have been split into a separate project with fastai2 but there’s no documentation about where it may have been moved to (at least from what I’ve seen). I didn’t see an equivalent module (1:1 move) so I’ve opened an issue on the github for clarification.
I had posted in another thread seeking help for getting a local and repeatable container up and running so I could follow along with the course (fastbook) without many issues that have plagued me with the online services. That post is here if your interested.
The conda env export is here.
My most recent dockerfile is here.
The scripts copied as part of the build are from the github from the article mentioned in the other thread (the medium post about repeatable environments).
@muellerzr Yes, I’ve been trying to find the utils package originally from fastai version 1.x.
There is still documentation in a number of places including the troubleshooting section which only references fastai 1.x imports without a corresponding fastai 2.x alternative. A few functions like the previously mentioned utils.mem.gpumemtrace, collect_env, and I’m sure there are others I’ve only worked with the library briefly so not too sure how much the other functions were used.