Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run on google Colab #153

Open
g-i-o-r-g-i-o opened this issue Jul 11, 2021 · 1 comment
Open

run on google Colab #153

g-i-o-r-g-i-o opened this issue Jul 11, 2021 · 1 comment

Comments

@g-i-o-r-g-i-o
Copy link

g-i-o-r-g-i-o commented Jul 11, 2021

Hello, can you please help to run the code on google colab?

How to view images on the colab without doing much work? For each file? Probably creating a directory on the notebook colab folder, where I put all the images?

Right now I get this error:

Image(filename='images/03_01.png', width=400) 
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-149-4c8da45e0c5c> in <module>()
----> 1 Image(filename='images/04_01.png', width=400)

Then there's the watermark problem, which is easy, I've just added pip install to your files:

# add this to run in colab:
!pip install -q -U watermark
# this is the same
%load_ext watermark
%watermark -a "Sebastian Raschka" -u -d -p numpy,pandas,matplotlib,sklearn

@rasbt
Copy link
Owner

rasbt commented Jul 15, 2021

Hi there.

Like you said, the errors are due to the missing images. There are multiple options you can try.

  1. You could download the image folder from https://github.com/rasbt/python-machine-learning-book-3rd-edition/tree/master/ch03/images and then upload it to Google Colab. It should be relatively easy now with their drag and drop interface.

  2. You could comment out or disable those cells because they are not really needed. I just have them in the notebooks so it is easier to find the respective code when looking at the notebooks

  3. You could replace the relative links by links to the images on github, but this would probably be tedious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants