"Running your first notebook" taking forever

fine_tune for the cats-cnn_learner doesn’t show any progress for >1h (see screenshot). Same code as in course and every single step before seems to work fine. Fans don’t make a sound. Running on a Mac.


1 Like

Hi Leos
Warning this is a GUESS. Did it show resnet34 being downloaded?
Regards Conwyn

Your Mac doesn’t have an NVIDIA gpu, therefore all fastai models will train on the CPU. As you’re finding out, it’s very slow relative to a GPU. Your best bet for a mac is to run the notebooks elsewhere, like colab, paperspace, AWS, etc.

Hi Conwyn
I cleared the torch cache and tried again to download resnet34. The notebook shows following:

So progress bar stays at zero but I can see the created .pth file in my file system (with size 87MB).
thanks and regards

Hi idraja
I already expected the training to be slow but there’s still zero progress after hours of “training”. The fans don’t make a sound and the laptop is cold so the CPU doesn’t really even seem to “suffer”. That’s why I suspect there might be another problem? But sure, I’ll have a look at the alternatives.
Thanks and regards

Hi ,
I am also facing issue , in my MAC.
How do you guys fixed it ?

If you add num_workers=0, to your data loaders, it will start training but it will take a lot of time.

dls = ImageDataLoaders.from_name_func(
path, get_image_files(path), valid_pct=0.2, seed=42,
label_func=is_cat, item_tfms=Resize(224), num_workers=0)

not sure what the problem is because i also have a mac and last year i ran this models and it took less than 2min to finish, i tried to re-run it today and it’s taking way much time.(still have the same intel 2018 macbook pro)

pytorch team has been making changes so pytorch can run on the new macs with Apple’s “M” chip. Just a wild guess here, that it probably has something to do with that? I know in the latest builds you have to specify “mps” or “cuda” or “cpu” specifically. Not sure how that translates to making it work when running stuff for older macs with, say, Intel CPUs.