I just pulled the latest course repo plus fastai library and noticed untar_data is not working. Seeing a NameError:
I was able to fix this by adding a top level import from fastai: from fastai import *
@sgugger@jeremy - IIRC this line was present in the earlier notebooks. Was it removed intentionally? If not, would you like me to add it back in and create a pull request? (hopefully i can figure out how to without breaking anything else!). Thanks.
from fastai.vision import * should be all you need. Have you run that? Is it missing in the notebook? If so, which one is it?
If from fastai.vision import * isnât fixing it for you, then you donât have the latest conda. Do a search of the forum or docs to see how to check.
Have checked multiple times (conda version 4.6, conda update conda issued, pulled fastai library to the latest) this strange problem persists for me.
from fastai.vision.import * isnât getting untar_data causing NameError.
Only from fastai import * is fixing it, getting it & many others (like np etc) in the namespace.
This indeed is weird.
Likewise. Just to be sure I did a conda update conda again after which ssh kept failing. Turns out conda update messed up my jupyter installation (known issue)! So I installed jupyter and the conda kernels manually and tried again. Then realised it also wiped out my pytorch installation.
Going to create a new GCP instance and try afresh and report back later today.
@maya - with a brand new GCP instance things are working fine for me (as Jeremy indicated, with fastai.vision import alone). Note that I did not have to update conda or install/update fastai libraries - this is what I got as-is with the new instance:
Now I need to decide if I should try to debug my older instance and get it to this state, or abandon it and move my config/setup to this new one. Sigh.
Hi, I have setup a new instance in crestle.ai and Iâm experiencing the same issue with the untar_data function not found.
The version of conda after executing conda update conda is 4.2.6 and the installed version after running conda install -c fastai fastai is 1.0.34.
Running conda update fastai doesnât upgrade the version of fastai so I guess conda version of fastai is not up to date. I can confirm however that the pip install fastai --upgrade resolved the issue by upgrading fastai to 1.0.42 version.
This is weird. I have my own local linux box that I used to do the 2018 course, so it has a bunch of fasta v0.7 stuff. I did Mayaâs two lines of code and it did seem to work but my pytorch version disappeared!
For the peeps that are having issues with running untar_data(), I found out that I have to import the fastai library as a whole to make it work - from fastai import *.
This worked for me as well. I had just recently built the environment and installed fastai and pytorch so I assumed I was at the latest version. FYI: I do need to add that I was confused about the NVIDIA GPU issue. Iâm on a MacBook Pro 2017 Mojave. So, it maybe possible I followed the wrong installation path. Anyways I did the upgrade and restarted the kernel
I had the same issue, adding the from fastai import * fixed it for me, thanks. I have had to juggle a few version changes just to get things working due to an intel mkl error, which ended up requiring an mkl downgrade to fix. Everything is working now except matplotlib, which is sufficient progress for tonightâs troubleshooting
Edit: Gah, I pushed it and tried to update fastai, as in the first post in the FAQ. That promptly broke mkl_intel_thread.dll again with the âordinal 242â error.
It turned out I needed to follow this post and add the indicated line to my system variables to finally resolve the MKL errors. In case anyone else runs across something similar.
Conda installed max 1.0.38 I used pip to get 1.0.51, neither works
Funny thing is, I got it to work once, but when I copied lesson1 to make my own dataset, the âNameError: name âuntar_dataâ is not definedâ came back on both notebooks
Check to see which version of fastai your python kernel is using:
in jupyter:
"import fastai; fastai. _ _ version_ _ [no spaces for underscores; post formatting workaroud]
in terminal (of your deeplearning environment):
python [opens up python command line]
import fastai; fastai. _ _ version _ _
if untar_data() is not working you havenât got an updated version. Another way to see this is use the following command and scroll to fastai row: >conda list
pip install wasnât able able to update the package for me either; I think conda overrides it.