Describe the bug
I have opened the vision tutorial notebook in colab, using the colab button on this page: https://docs.fast.ai/tutorial.vision. When trying to execute the first cell (from fastai.vision.all import *) I get the following error:
ModuleNotFoundError: No module named 'fastai.vision.all'
After some poking around, I tried to remove the ".all" in the above code, and the cell executed successfully. Assuming that was a valid bug workaround, I then tried executing the other cells. On the cell containing dls = ImageDataLoaders.from_name_func(path, files, label_func, item_tfms=Resize(224)), I received the error:
NameError: name 'ImageDataLoaders' is not defined
To Reproduce
See Above
Expected behavior
I expected to execute each cell without errors and with correct output.
Error with full stack trace
Place between these lines with triple backticks:
Additional context
Add any other context about the problem here.
Hi @rfernand2 I found a potential solution (from the fast.ai course forums) which is to run !pip install fastai --upgrade, then restart the runtime, upon which the fastai.vision.all import worked for me.
Thanks @vishalbakshi - that fixed the 2 problems for me! But it seems there is a tutorial / colab version pairing problem that I hope gets addressed by this issue.
I've added a pip upgrade cell to the top of every notebook now, which should resolve this.
Awesome thanks
Get Outlook for iOShttps://aka.ms/o0ukef
From: Jeremy Howard notifications@github.com
Sent: Tuesday, September 29, 2020 1:56:10 PM
To: fastai/fastai fastai@noreply.github.com
Cc: Roland Fernandez rfernand@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [fastai/fastai] Problems running vision tutorial in colab (#2762)
I've added a pip upgrade cell to the top of every notebook now, which should resolve this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffastai%2Ffastai%2Fissues%2F2762%23issuecomment-700981263&data=02%7C01%7Crfernand%40microsoft.com%7C85dcdaf089434cda20f008d864ba183b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637370097714369265&sdata=PVESoqKA1evsRqYOHd5sIUbvi2XJnGvfcWk2%2FYYlhQw%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABAY3XU2LNHKLB5P6YNAQIDSIJCWVANCNFSM4Q3JMU5Q&data=02%7C01%7Crfernand%40microsoft.com%7C85dcdaf089434cda20f008d864ba183b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637370097714379260&sdata=oqTCu%2BQJ8%2FV4Itf91EX6LpKDna3lykxDeyLCJgYs%2BuA%3D&reserved=0.
Most helpful comment
Hi @rfernand2 I found a potential solution (from the fast.ai course forums) which is to run
!pip install fastai --upgrade, then restart the runtime, upon which thefastai.vision.allimport worked for me.