I spent a few hours trying to figure out why the commands to setup fastai in a kaggle notebook were not working:
!pip install -Uqq fastbook
import fastbook
fastbook.setup_book()
First it complains about kornia and allennlp versions. I tried to upgrade them first and then run the setup but I realized the GPU was disabled as a consequence (torch.cuda.is_available() to check).
I finally found the solution and some explanation here:
I just wanted to share this with others who might struggle like me!
I didn’t dig why “Currently latest version of torch 1.6 disables using GPU on kaggle Notebook”. I’ve read and experienced the fact that pytorch might silently fallback to CPU (as explained in https://fastai1.fast.ai/troubleshoot.html)… not sure why or if there’s a beginner explanation.