Beginner: Using Colab or Kaggle ✅

Ah, yes :slightly_smiling_face: That does happen on Colab as well, if you update some installed packages, it will tell you to restart but generally, you should be fine to ignore that and continue on …

1 Like

To be fair, it says “you may”, not “you will”… :smiley:

1 Like

Got it!

I’m having this same issue on Kaggle. Once I do:

from fastai.vision.all import *

the autocomplete seems to stop working and the cpu usage is pegged out at 100% and is red. Any reason that import would be causing issues?

I tried commenting out the import from fastai.vision.all and autocomplete will work when I restart the kernel.
This works fine:

from fastcore.all import *
from fastdownload import download_url
from duckduckgo_search import ddg_images
# from fastai.vision.all import *

Once I do the import from fastai.vision.all then the autocomplete breaks on Kaggle for me. Being new to fastai and a lot of these packages it is very helpful for me to have access to that autocomplete. Any suggestions?

Also, if I just import Image from fastai.vision.all then autocomplete for the other functions works fine but it will not autocomplete the Image function for me.

1 Like

I still haven’t found a solution to this. I’d appreciate any help anyone can give. I also posted a link to this in discord 10 days ago but still haven’t had anyone respond yet.

Hey,

I noticed that and it was very difficult to work on Kaggle for me, too.
I suggest you use Colab or Paperspace.
I like to use Paperspace because I can save my notebooks, github and kaggle stuff.
If you haven’t had chance to watch live coding videos, I suggest you do that as well.
Jeremy shows how to setupt the coding environment in the videos.

3 Likes

I just noticed positive and negative numbers at the top of the Kaggle notebook copied from a lesson. Is that something to do with changes compared to the original? There’s no tool tip or anything when hovering over them and clicking them just brings me to the original notebook. Could someone please let me know what these mean? Thanks.
topofnotebook

Hi there, just starting lesson 1 and getting this issue with the classifier. I am starting this in Colab. Can anyone offer some guidance please?

img = PILImage.create(uploader.data[0])

is_cat,_,probs = learn.predict(img)

print(f"Is this a cat?: {is_cat}.")

print(f"Probability it’s a cat: {probs[1].item():.6f}")


FileNotFoundError Traceback (most recent call last)
in
----> 1 img = PILImage.create(uploader.data[0])
2 is_cat,_,probs = learn.predict(img)
3 print(f"Is this a cat?: {is_cat}.“)
4 print(f"Probability it’s a cat: {probs[1].item():.6f}”)

2 frames
/usr/local/lib/python3.8/dist-packages/PIL/Image.py in open(fp, mode)
2841
2842 if filename:
→ 2843 fp = builtins.open(filename, “rb”)
2844 exclusive_fp = True
2845

FileNotFoundError: [Errno 2] No such file or directory: ‘images/chapter1_cat_example.jpg’

Hello, Ahmad. I think the problem is that you are giving wrong directory to images as it suggests at the end:

Try to look through images and replace following piece of code

1 Like

Thank you that was helpful and works now.

Hello! I am having a problem where my Google Colab is running very slow. The first cell of lesson 2, installing fastbook has taken over 10 minutes so far. Is this normal and is there anything I can do?

Thank you!
-Avery

Sounds like GPU acceleration has not been selected.

See my note in this thread on how to select it. `learn.fine_tune(1)` Chapter 1 - takes forever - #2 by AllenK

3 Likes

This worked, thank you!!

1 Like

Hi all :wave:
(please let me know if this is the wrong place for this question)
I’ve started the course in the last few days and have found it confusing whether Paperspace Gradient is still a recomended platform. Most material now seems to be between Colab and Kaggle as in the title of this thread.

Am I missing something?

I am guessing that you deleted 24 lines and added 14. It should be easy to experiment to confirm.

Having finished the course, my personal experience:

  • Kaggle provides a good “quick start” platform, most suitable for duplicating single notebooks of first couple of lessons - but a pain to work with multiple files and long training timeouts.
  • Paperspace was simplest and most flexible to experiement with the later lessons.
  • Colab I found a bit awkward to use.

Overall, you won’t lose anything learning to use both.

1 Like

Thank you @bencoman for these inputs. As someone starting the course afresh (and expecting slow progress initially), would you recommend starting on Kaggle and move to Paperspace later with advance topics or start on Paperspace rightaway to get used to it?

Thanks in advance

Hard to unlearn what I know now and think back to the start. Roughly, do the first two lessons on Kaggle and the rest on Paperspace. YMMV, but using both provides perspective and options.

1 Like

Thank for your sharing, my only problem with paperspace is I hardly get free GPU machine. Do you have any advise for my situation? I had search around in forum and didn’t see anyone facing this problem yet.

So I actually subscribe to the $8/month level. This gives more choices of Free GPU. I like the fixed cost and its less than a streaming service and better for me. Soemtimes I do need to wait five minutes to get an instance started, but never a problem after the instance starts.

1 Like