Setting Up Kaggle in Google Colab

Setting Up Kaggle in Google ColabA Simple Tutorial for the Total NewbieAnne BonnerBlockedUnblockFollowFollowingDec 31I want all the data and I want it now!Photo by Logan Fisher on UnsplashYou know where all those datasets are and you know where you want them to go, but how do you easily move your datasets from Kaggle into Google Colab without a lot of complicated madness?Let me show you!Discovering the joy that is Google Colab was definitely one of the smartest things I’ve done since getting started with deep learning, machine learning, and AI..Google Colab provides free GPU (for real!) to pretty much anyone who wants it..If you’re just getting started, you need to get on Colab!.I wrote another article that covers some basic troubleshooting, but getting Kaggle up and running in Colab deserves its own article.Photo by Oscar Söderlund on UnsplashAlthough Colab is extremely user-friendly, there are a few details that you might want help with while getting yourself set up.Kaggle, it turns out, is one of those details.Kaggle needs a little finesse..A little love..However, if you’re after those sweet, sweet datasets, you want to get this working!.It’s actually really simple; there are just a few easy steps you need to take..If you just want to view the code on GitHub and move on with your day (things can get a little…verbose…around here), you are welcome to do so!Here’s the simplest way I’ve found to access the Kaggle data for the first time:Getting Started(One quick note: in order to be able to access the Kaggle data, you’ll need to be signed up with Kaggle (free!) and agree to the terms and conditions of the competition that you want to participate in.)First, grab your token from Kaggle.Go to your account page (the drop-down menu in the top right corner of the screen will take you there).Then scroll down to API and hit “Create New API Token.”That’s going to download a file called kaggle.json..Make sure you know where this file is!.Maybe put it somewhere you can find it…Just a suggestion.Open the file and you’ll see something that looks a lot like this:{“username”:”YOUR-USER-NAME”,”key”:”SOME-VERY-LONG-STRING”}Have that thing handy for a future copy-and-paste!Next, go to Colab and start a new notebook..I’m a big fan of getting up and running on GPU right away, and to do that, go to the “runtime” drop-down menu, select “change runtime type” and then select GPU in the “Hardware accelerator” drop-down menu..Then hit SAVE.Next, you’ll want to install Kaggle.. More details

Leave a Reply