Kaggle Kernels Now Support GPU for Free

Good news! You can add an NVIDIA Tesla K80 GPU to your Kernel through the “Settings” tab. Here’s an example of training a model on a GPU.

https://www.kaggle.com/dansbecker/running-kaggle-kernels-with-a-gpu

a

I gotta try this with fastai soon.

10 Likes

Looks good. Thanks for sharing! How can one use fastai with it? Thanks!

You can use fastai with kaggle, since it is pip installable. Although the version on pypi is a little old now. I’ll try to update it soon.

Is there a way to use pip install git+https://github.com/fastai/fastai/... to install the latest version of FastAI?

should work pip install git+https://github.com/fastai/fastai.git

1 Like

I’ve just updated the version in pypi to the latest - don’t know how long it takes kaggle to update however. The new version is 0.7.0.

7 Likes

fastai is one of the packages that come pre-installed with kaggle kernel. Does it use pip or github to install them though?

FYI, I’ve moved this post to the new “Deep Learning” category.

It uses pip.

There’s a problem that I guess has to do with requirements on windows, so I’m tagging you @jeremy .
Doing “pip install fastai” on Windows 10 tries to look for “torch<0.4” and fails, saying that Pytorch does not provide packages for PyPI.
Any chance this has anything to do with fastai requirements? Does it really need torch<0.4.0 (No Windows)?

This is a thread about Kaggle kernels - you’ll be more likely to get an answer if you post to or create a thread about windows (and you don’t need to tag me on questions that others can answer).

(As mentioned in the readme, pip isn’t recommended for installation - it’s only really there to support kaggle kernels, or those who can’t use conda for some reason.)

I figured I could ask here given that you updated us about fastai 0.7.0 in this topic, but I understand. Thanks anyway, I’ll keep using git then!

For pytorch<0.4 on windows
peterj123 made a conda package that covers most functionality well, see https://github.com/pytorch/pytorch/issues/494

OK, me I used the github version putting fastai/fastai in the github field and it works as a charm.

1 Like

What to do after putting fastai/fasti in GitHub field?

GPU fastai setup for kaggle kernels https://medium.com/p/learn-deep-learning-with-gpu-enabled-kaggle-kernels-and-fastai-mooc-72fee41bb4b5

2 Likes

I hope this is okay:
https://www.kaggle.com/ailobe/fastai-ml1-lesson1-rf

I have problem using fastai on Kaggle. When I activate the GPU, the ColumnarModelData.from_data_frame return error.

I don’t have this problem when the GPU is off. I see this error in an old version of fastai (found in another thread), so I guess the fastai on Kaggle is not updated yet.

I try to reinstall fastai with ‘add custom package’ but I also have an error.

package

Can someone can help me on this problem ? This is the first time I try a Kaggle Challenge. My code works fine on my PC but I really want to share it on Kaggle, to help beginners but also get feedback from the experts.

You can find my kernel here: NYC taxi fare

Thank you in advance

fastai library version 0.6 is very old.

fastai library preloaded with Kaggle Kernel is outdated.

Refer to: https://www.kaggle.com/product-feedback/58937

You only put the username. Missing the repo name. The correct format is username/repo. So in this case, fastai/fastai.

However, once you get passed this error, I think you will encounter another different problem “Installing custom packages doesn’t work for the gpu image”

https://www.kaggle.com/product-feedback/62220#post366900

We have reported this problem through Kaggle’s product feedback. Unfortunately, according to Kaggle, this is a known bug and their engineering team is on it.

1 Like

Thank you so much for your information. So I think now I should stay on my own PC and waiting for these issues fixed.