Lesson 2 discussion - beginner

Use this thread to discuss topics related to lesson 2.

3 Likes

After the first lesson, did try to play around with some dataset from kaggle.com and found the dog breed identification challenge relevant. Based on discussions in the Part1v2 category tried getting the dataset through gaggle cli but ran into a lot of errors and couldn’t finally do it. you also mentioned in the 2nd session about it when you went through the jupiter notebook for the challenge.
So, Could you please give a steps guide as through how do we download the dataset and get it into the data folder with folders for test, train, val and model.

I am not if this helps, but I will explain my setup of kaggle-cli. After I pip install kaggle-cli, I am able to use kg command to download the data files. Did you try the command kg download -u <username> -p <password> -c <competition> as per the readme in https://github.com/floydwch/kaggle-cli?

Once it’s downloaded, I unzip the files into the right folders. Hope this helps.

1 Like

So for Dog breed competition the syntax will be -

kg download -u <username> -p <password> -c dog-breed-identification

You can get the competition name from the URL of the Kaggle Competition page (string that comes after /c/- https://www.kaggle.com/c/dog-breed-identification

3 Likes

Note that if you’re using crestle, you need to type pip3 instead of pip in the commands above from @ramesh.

BTW, you’ll get more helpful responses if we can see what you type and what errors you get - here’s some hints that hopefully are useful: http://wiki.fast.ai/index.php/How_to_ask_for_Help

2 Likes

@jeremy - When i ssh to the Asia Mumbai AMI that you added, i get this error. it was working fine before. I don’t understand what is wrong.
48 PM

@sree your image is cutoff on the right so I can’t see the whole command, so I can’t see what’s wrong with it.

You must have done it on the wrong file, because that error is definitely saying the permissions are 0644. If you double-check and you’re still sure, show a screenshot of you doing pwd, then ls -l on the folder with the .pem file, and then the ssh command you show above.

If you shut down your instance and started it up again today, it’ll have a different IP - check the AWS console that it’s the right IP.

I did shut it down and restart it today. Double checked the ip. But right now i stopped and restarted it again. Tried ssh’ing with the new ip that i get again. can’t get in. Im sorry for asking this if this is like a pre beginner thing.

@Sree In your home dir, try to put the .pem file under a hidden .ssh dir rather than directly under your home dir, and make sure that under .ssh dir your .pem file’s access mode is 400.

1 Like

Good point! Also, the .ssh dir should have same (400) permissions. If you follow the steps in the lesson video this is all done automatically, BTW, so if you’re stuck, remove your instance and start again following the steps in the video.

1 Like

I stopped the instance in mumbai region and went over and created a new key pair, added this key pair for the instance and did the other steps after this and it worked. Don’t know what the issue was. Thank you @jeremy n @wluo

1 Like

Another point to add here is to make sure you accept the competition rules before trying kg download

5 Likes

My kaggle login is through google. In this case how do i set my “password” for kaggle-cli? I did “kg download -u -p -c dog-breed-identification” and i get “list index out of range”. What does this mean?
I was looking into Kaggle-cli issues and saw a python script but did not know how to go about with it.

You’ll need to change your Kaggle login to use a regular password.

1 Like

BTW we only very briefly mentioned downloading from Kaggle this week, so we’ll be looking at it in more detail in the next class.

Just changed to a regular password on kaggle. I understand kaggle part was mentioned briefly this week, but i wanted to try doing it out, so had the issue with doing the setup initially.

Yup I’m glad you asked - just wanted to make sure no-one was feeling behind!

In my experience with this API you first have to accept the terms of the competition in Kaggle to be able to use it.

1 Like