Live coding 2

thanks a lot, I will try to use it

Well, as expected, it looks like a problem with Paperspace. Seems connection to DuckDuckGo is forbidden for some reason :frowning:

I also started having issues pulling images from ddg. I tried with colab and kaggle. Same code working fine before stop working today. I wonder if ddg started to block traffic. Too many fastai learners perhaps :slight_smile:

I’m basically getting connection timeout errors

3 Likes
import requests
url = "https://duckduckgo.com/?q=grizzly+bear"
response = requests.get(url, headers={'user-agent': 'my-app/0.0.1'})
response.raise_for_status() # throw an exception if not a 200 return code
data = response.text # this is the HTML assuming that is what the URL returns
print(data)

this code works fine on my computer but not on colab or kaggle

1 Like

I used it a week ago. So for now the solution could be getting images via computer and upload it in paperspace. (I did not try to see if there is any issue with that). Currently going through live coding sessions and soon I may have to train another model.

1 Like

seems it is

Opened the issue at GitHub search_images_ddg always fails with TimeoutError · Issue #528 · fastai/fastbook · GitHub

Seems that DDG is blocking a bunch of stuff. I’ve updated the code in the repo now and it seems to work.

2 Likes

@yond4im, You mention WIndows 10, but you don’t mention WSL. Strongly recommend you use WSL.

Reviewing INSTALL.MD, Jeremy’s advice throughout the course was to not use conda environments. Read down from there I have have some other posts that summarise what is required for a WSL install.

p.s. I’m an electrical power engineer. I’d be interested in any ML you do in that domain.

First, what were you trying to achieve with two-colons in cd ::/home ?
Was that meant to be double-period?

I just would like to go through my main Documents on the windows explorer

Could you clarify why you want to do that? Are there Windows tools you would like to use?
You expose yourself to the risk of the Dreaded Mixed Line Endings.

I also would like to know what is “not recommended” in Aurélien Géron’s method

By default, I’d say don’t “Create the homl3 Environment”. For a beginner trying to use multiple environment adds unnecessary complexity. Just operate in the base environment - until you bump into a case where you “know absolutely” that you need them - probably years away.

However I’m not sure the impact that will have on the following instruction

The notebooks in this project will default to the environment named python3 , so it’s best to register this environment using the name python3 (if you prefer to use another name, you will have to select it in the “Kernel > Change kernel…” menu in Jupyter every time you open a notebook)

I’m fairly sure by he means “every time you open a notebook the first time” which is not really a big deal. Additionally the default kernel for Juyper Lab is already is Python3…

image

Except for the GPU drivers section, you’ll probably get the same results as handson-ml3/INSTALL.md using a simpler setup like my Jupyter install log, then just doing…

$ git clone git clone https://github.com/ageron/handson-ml3.git
$ cd handson-ml3
$ jupyter lab

Note, shortly after I made that install log, the course in the advice was to run…

$ jupyter lab

rather than

$ juypter notebook

I’m not really sure the distinction since this was my first time using Jupyter, and so never really got a feel for “jupyter notebook”.

Thank you for the video Jeremy and everyone who participated, I learned a lot following along!

1 Like

At time 22:21 in Live Coding 2 a Warning pops up with regard to “paste text contains multiple lines”. How do you make this Warning occur?

Hi, I had a quick beginner level question.

By the end of Live Coding 2, we got setup the fastai library in our Linux system and we were running fastbook NBs. I do not have any physical GPUs connected to my system so I was wondering where the model codes were running. Was it running on my local PC?

It was pretty slow compared to Kaggle Notebooks servers/Colab.

Thanks in advance.

1 Like

hi @silience,
Yes, the code was running on your local CPU, which is slower than a GPU.

1 Like

Select multiple lines, copy, paste.

1 Like

Here is a list of the the bash commands I learned here that I expect to use a ton in the future:

bash go back to the last directory you were in

cd -

to save a directory use

pushd [dir]

for example

pushd ~/Documents

to go back to there use

popd

to create public/private keys in git once initiated or attmepted too clone use

ssh-keygen

to pull up public ssh key in the terminal (to then paste into github):

cat ~/.ssh/id_rsa.pub

use controll + r to search past bash entries by typing the first few letters of it

controll + r

I hope that I get this explanation correct. Although Jeremy advocates for SSH, it is highly advised to use SSH vs HTTP. As of November 1, 2022. GIT no longer allows pushes using HTTP:
remote: Support for password authentication was removed on August 13, 2021.
Please see About remote repositories - GitHub Docs for information on currently recommended modes of authentication."

If what I am saying is misleading or incorrect, please advise.

1 Like

I wrote a blog based on this video.

Hopefully it’s helpful.

1 Like

You are correct. Personal Access Tokens is an option - but I’ve not tried them yet. Authentication - GitHub Docs

Hello Fellows.

I have been following up the recorded version of walkthru and I did nearly everything as Jeremy did/ But I am wondering why Ctrl+B+% or Ctrl+B+" is nor working for me. My laptop is running on Windows 10 and I’ve created Ubuntu in the way shown in walkthru.

Any advice appreciated

1 Like