Platform: Colab

@gamo My colab /etc/fstab is empty (except for one comment), so sed doesn’t work. Instead I just created a new one with the shm you show.

Do you know why we might have different fstab’s? I’d like to create something that works reliably.

1 Like

@jeremy The fstab is empty, except for the comment, to begin with. The sed command will append the tmpfs entry if there is none and update it if there is one.

This is what I get when I run that section with some output added.

2 Likes

Fantastic @gamo . Script updated. You can now set up your colab notebook with just one cell:

 !curl http://course-v3.fast.ai/setup/colab | bash
11 Likes

Looks good.
Makes it a lot easier to get set up.

1 Like

I followed the instructions in the link http://course-v3.fast.ai/start_colab and everything went fine. Then, from the colab welcome page, I opened 00_notebook_tutorial.ipynb and started working through it. I encountered a couple of problems:

In the opening block of text is the following instruction:
"On the page you used to open this, tick the box next to the name of the notebook and click duplicate to easily create a new version of this notebook."

Problem 1: there is no box to tick, and no ‘duplicate’ selection.

I saved a copy to google drive by clicking on the link at the right of the filename (is that what the instruction was trying to tell us to do?), opened the copy and continued to follow the notebook

In Section 1: Need to Know under the subsection labeled Writing, there is the following instruction "Click on the the ‘+’ button on the left and select Markdown from the toolbar."

Problem 2: There is no + button on the left and there is no toolbar from which to select "Markdown"

In fact, the notebook lacks the orange jupyter graphic at the left of its toolbar menu ,as pictured in the diagram accompanying (below) the instruction. Instead, a colab graphic (looks sort of like an infinity symbol) appears at the left of the toolbar menu; and though the toolbar has ‘+’ buttons to create text and code cells, there is no button to create a markdown cell. As far as I can tell, there is no way to create a markdown cell, or to change an existing cell to markdown, as in the normal jupyter interface.

Has anyone else encountered these problems, or have I missed something?

The colab interface is a bit different from the regular jupyter notebook interface.

The class notebooks are written for regular jupyter notebooks so the instructions may not match exactly what you need to do in colab.

Problem 1:
Saving to google drive just as you did is the way to go.
Markdown cells in colab are called “text” cells.

Problem 2:
Colab does not (to my knowledge) allow you to change cell types.

You can use the menus, icons and key shortcuts to add/delete/edit cells. You can also add cells by hovering between cells and use the popups.

Use Ctrl+M H to view the key shortcuts to increase your productivity.

1 Like

Thanks Gabriel, that’s very helpful. I didn’t know that “text” cells are the same as “markdown”.

Problem 2 isn’t true.IIRC, the keyboard shortcut for switching to markdown is Cmd+M+M (or Ctrl M M for Win)
and for switching to code is Cmd/Ctrl Y Y .

1 Like

hello

when i run:

!curl http://course-v3.fast.ai/setup/colab_update | bash

i get this:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13258 100 13258 0 0 231k 0 --:–:-- --:–:-- --:–:-- 235k
bash: line 1: syntax error near unexpected token newline' bash: line 1:

thanks

It would seem as the script at http://course-v3.fast.ai/setup/colab has been updated. It now checks to see if you already run it and fastai is already installed, if so it will update installs and repos.

The colab_update script does not seem to be available any longer.

@jeremy is this true?

1 Like

You are right, my bad for not reading the whole shortcut list.

There does not seem to be a way to do this through the gui though.

1 Like

I’ve made a Notebook to classify Alien vs. Predator images using Google Colab, more info here:

Yes that’s right. Let me know if you see anything you think could be improved.

The link is missing the “s” at the end of http. Should be:

!curl https://course-v3.fast.ai/setup/colab | bash

Made a PR to fix the issue https://github.com/fastai/course-v3/pull/56

Done!

1 Like

as asked in the opening markdown cell it asks to create a duplicate by clicking on a tick in a box.

there is no box to click

i tried saving the notebook to my drive but the cell

" Image.open(‘images/notebook_tutorial/cat_example.jpg’) " is showing an error as there is no images directory in my drive.

what is the solution? do i have to compulsarily create an images folder in my drive or download it locally or is there another solution ?

The widge from fastai does not work well.
you have to upload it with colab and copy the path to see where the image is.
For example, you can see the copy path word selection in below, and the image location is at /content/11111.jpg: I was using the fastbook lesson5 notebook

So you’re saying ill have to upload the images folder to my drive too ?

You can also upload it to your google drive or just upload it to the colab. See the bottom upload and mount drive in above? You should try it on your own.

I’m unsure if this is a colab issue or a lesson question, I’m basically running through lesson 1 on colab and the learn.lr_find portion seems to work up to around 66% on the progress bar but then displays the LR_find complete output while leaving the progress bar stuck at 61/92 (~66%).
Is this behavior expected?

The plots and subsequent parts of lesson one come out fine from what I can tell, but its unclear at this early stage whether lr_find is working properly.