saiyan6174
(Jithendra Yenugula)
July 31, 2020, 11:47am
1
I am running the first chapter of fastbook on colab - while running this cell with uploader, it is giving me an error.
Also, why it is taking huge amount of time for me on colab to run the chapter-1?
It took me 32min and 47 mins where as in the book - it is just 14secs and 19secs ??
(I changed the runtime to GPU!)
2 Likes
muellerzr
(Zachary Mueller)
July 31, 2020, 12:06pm
2
See the recent post in v2 chat. Most likely the wrong torch version is installed. Also widgets will not work in colab.
malika
(Malika Arora)
August 29, 2020, 2:11pm
3
Were you able to solve this?
muellerzr
(Zachary Mueller)
August 29, 2020, 2:12pm
4
Widgets do not work in Colab (as my previous post states). If it takes a long time to train make sure you have the GPU enabled and torch.cuda.is_available()
returns true
1 Like
malika
(Malika Arora)
August 29, 2020, 2:14pm
5
Greetings!
How do I solve the first error i.e. NameError?
muellerzr
(Zachary Mueller)
August 29, 2020, 2:15pm
6
You can’t run the widgets section inside Google Colab, so there is no working solution. As I said in the first sentence and my first post.
jeffbiss
(Jeff Biss)
September 1, 2020, 5:56pm
8
It just happened to me in paperspace: https://nmf7d80p.gradient.paperspace.com/notebooks/fastbook/01_intro.ipynb
I searched for information about widgets in jupyter and gradient and found this:
https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Basics.html
Using that information I added the following line:
import ipywidgets as widgets
to the existing code so that it is now:
#hide_output
import ipywidgets as widgets
uploader = widgets.FileUpload()
uploader
and it ran and I could upload my image. So, if others are having that problem, try adding that import statement.
34 Likes
BrettC
(Brett Carter)
September 4, 2020, 4:05am
9
I had this issue on Paperspace too and this did the trick. Thanks @jeffbiss !
1 Like
jeffbiss
(Jeff Biss)
September 4, 2020, 2:10pm
10
Good to hear that I was able to help someone! You’re welcome.
open_it
(Nick)
September 9, 2020, 2:31pm
12
This solution worked for me but then I had this error in the next bit of code
NameError: name ‘SimpleNamespace’ is not defined
Is there some kind of compatibility error going on? Super discouraging to have wrenches thrown into your very first examples.
jeffbiss
(Jeff Biss)
September 9, 2020, 4:37pm
13
Depending on what I missed, I had other errors, don’t remember if that was one though. I suggest to start at the very beginning and run each bit of code, maybe you missed one and that lead to that error, I know that that was the case for me. Try it and let us know if it clears up or not.
1 Like
bcadkins
(Brandon)
September 10, 2020, 12:40am
14
This worked for me too, thanks!
ahmed3yad
(Ahmed Ayad)
September 24, 2020, 12:10pm
16
Thanks … I had the same problem and this solution worked for me.
Fahimeh
(Fahimeh)
October 6, 2020, 5:34am
17
It was so helpful. Thanks a lot
First write the following code :
from fastbook import *
After this write the code for widgets.FileUpload()
1 Like
anoopbose
(Anoop Bose)
December 20, 2020, 6:55am
19
What a lifesaver! Thanks a ton @jeffbiss
jeffbiss
(Jeff Biss)
December 20, 2020, 3:41pm
20
You’re welcome! I’m just glad that I am actually able to help.
jeffbliss, thank you! This solved the issue in SageMaker as well.
Best
PO
1 Like