Colaboratory and Fastai


(Sharwon Pius) #41

How to download the submission csv file from this temporary google colab environment, to my drive or local pc?


(Amrit ) #42

@SHAR1

Try this help page:
colab.research.google.com/notebook#fileId=/v2/external/notebooks/io.ipynb

Downloading files to your local file system

files.download will invoke a browser download of the file to the user’s local computer.


from google.colab import files

​with open('example.txt', 'w') as f: f.write('some content')​files.download('example.txt')

(Sharwon Pius) #43

@amritv Thank you!


(dinesh) #44

hi, jacob
i started going through your colab notebook of lesson1 and i started to do the same thing in mine but when i reached the line
os.listdir(path)
i got an error saying nameerror: os name not found. later i imported ‘os’ module - "import os"
and when ran the same line the i’m getting this error
lesson1
what is causing this?


#45

Apparently other running Colaboratory Notebooks use memory on the same ‘PC’. Make sure they are not running to resolve the ‘Out of memory’ error.

I had applied your patch, but I was still getting the error. Finally, I got a Google popup saying my ‘PC’ was nearly out of memory, asking if I wanted to close the other programs to prevent the 'PC" from crashing.


(Jacob Pettit) #46

Hi Dinesh,

I’d say check your Path variable and make sure it is pointing to ‘/data/dogscats/’. Also, there is a line in the notebook which fetches the data and makes the data directory, it is the following command: ‘!mkdir data && wget http://files.fast.ai/data/dogscats.zip && unzip dogscats.zip -d data/’. If it is not those issues then let us know what other errors are thrown and if you cannot sort it out you can find help here!

Jacob


(Jacob Pettit) #47

Yes, I’ve had that popup as well. I find that I’m consistently using between 8 and 9 GB of RAM on Google’s VMs for the Lecture 1 network.


(Eternal) #48

Hi Jacob,

Simply cloning the repo doesn’t work for me.

!git clone https://github.com/jfpettit/fastai
from fastai.imports import *
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-21-94ce375e95cb> in <module>()
----> 1 from fastai.imports import *
      2 from fastai.transforms import *
      3 from fastai.conv_learner import *
      4 from fastai.model import *
      5 from fastai.dataset import *

  ModuleNotFoundError: No module named 'fastai.imports'

Do I have to do something additional?


(Jacob Pettit) #49

Hi,

I’ve not seen this error yet and I’m really not quite sure how to fix it. Did you try just installing the normal fastai library and seeing if that’ll work for you? Some people have not had any issues with it on Google Colab and I’ve not had any issues with the normal library since when I first created my edited version. I’ll have to take a closer look at this tomorrow, I hope you’ll forgive me but it’s currently about midnight where I am so I’ve really got to get some sleep! :slight_smile:


(Eternal) #50

I was facing the same issues you were using the original fastai libraries.
I was using pip install to install the original fastai libraries. Basically I wanted to know how to install your the edited version.
GN for now :smiley:


(dinesh) #51

i was getting same error
ModuleNotFoundError: No module named 'fastai.imports'
when used
!git clone https://github.com/jfpettit/fastai.git
so instead i have checked jacob’s edited notebook and tried to replicate the same thing and now i’m getting different kind of errors.
checkout his notebook.


(Savio) #52

Hi ,
I was just starting with lesson 1 and had to download dogscats.zip file .I was wondering how you guys imported data into collaboratory from files.fast.ai , because what i did was that i first downloaded the file from files.fast.ai ,then uploaded it into google drive and then imported it into collaboratory which was rather tedious since my internet is too damn slow. Does anyone have a better idea to directly download files into google drive and extract it successfully because all extraction options in google drive is ultimately showing error for this file.


(Himalayas) #53

You could use the curlwget extension for chrome Jeremy has mentioned about transferring data and cut and paste that into jupyter notebook as !cd datadirectory && cut and paste that wget command


(Himalayas) #54

Have started seeing this error in Colaboratory since Feb 12th
Could not find a version that satisfies the requirement botocore==1.8.43 (from awscli->fastai) (from versions: 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.15.0, 0.15.1, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0, 0.33.0, 0.34.0, 0.35.0, 0.36.0, 0.37.0, 0.38.0, 0.39.0, 0.40.0, 0.41.0, 0.42.0, 0.43.0, 0.44.0, 0.45.0, 0.46.0, 0.47.0, 0.48.0, 0.49.0, 0.50.0, 0.51.0, 0.52.0, 0.53.0, 0.54.0, 0.55.0, 0.56.0, 0.57.0, 0.58.0, 0.59.0, 0.60.0, 0.61.0, 0.62.0, 0.63.0, 0.64.0, 0.65.0, 0.66.0, 0.67.0, 0.68.0, 0.69.0, 0.70.0, 0.71.0, 0.72.0, 0.73.0, 0.74.0, 0.75.0, 0.76.0, 0.77.0, 0.78.0, 0.79.0, 0.80.0, 0.81.0, 0.82.0, 0.83.0, 0.84.0, 0.85.0, 0.86.0, 0.87.0, 0.88.0, 0.89.0, 0.90.0, 0.91.0, 0.92.0, 0.93.0, 0.94.0, 0.95.0, 0.96.0, 0.97.0, 0.98.0, 0.99.0, 0.100.0, 0.101.0, 0.102.0, 0.103.0, 0.104.0, 0.105.0, 0.106.0, 0.107.0, 0.108.0, 0.109.0, 1.0.0a1, 1.0.0a2, 1.0.0a3, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0rc1, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.2.10, 1.2.11, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.3.15, 1.3.16, 1.3.17, 1.3.18, 1.3.19, 1.3.20, 1.3.21, 1.3.22, 1.3.23, 1.3.24, 1.3.25, 1.3.26, 1.3.27, 1.3.28, 1.3.29, 1.3.30, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.4.23, 1.4.24, 1.4.25, 1.4.26, 1.4.27, 1.4.28, 1.4.29, 1.4.30, 1.4.31, 1.4.32, 1.4.33, 1.4.34, 1.4.35, 1.4.36, 1.4.37, 1.4.38, 1.4.39, 1.4.40, 1.4.41, 1.4.42, 1.4.43, 1.4.44, 1.4.46, 1.4.47, 1.4.48, 1.4.49, 1.4.50, 1.4.51, 1.4.52, 1.4.53, 1.4.54, 1.4.55, 1.4.56, 1.4.57, 1.4.58, 1.4.59, 1.4.60, 1.4.61, 1.4.62, 1.4.63, 1.4.64, 1.4.65, 1.4.66, 1.4.67, 1.4.68, 1.4.69, 1.4.70, 1.4.71, 1.4.72, 1.4.73, 1.4.74, 1.4.75, 1.4.76, 1.4.77, 1.4.78, 1.4.79, 1.4.80, 1.4.81, 1.4.82, 1.4.83, 1.4.84, 1.4.85, 1.4.86, 1.4.87, 1.4.88, 1.4.89, 1.4.90, 1.4.91, 1.4.92, 1.4.93, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.5.13, 1.5.14, 1.5.15, 1.5.16, 1.5.17, 1.5.18, 1.5.19, 1.5.20, 1.5.21, 1.5.22, 1.5.23, 1.5.24, 1.5.25, 1.5.26, 1.5.27, 1.5.28, 1.5.29, 1.5.30, 1.5.31, 1.5.32, 1.5.33, 1.5.34, 1.5.35, 1.5.36, 1.5.37, 1.5.38, 1.5.39, 1.5.40, 1.5.41, 1.5.42, 1.5.43, 1.5.44, 1.5.45, 1.5.46, 1.5.47, 1.5.48, 1.5.49, 1.5.50, 1.5.51, 1.5.52, 1.5.53, 1.5.54, 1.5.55, 1.5.56, 1.5.57, 1.5.58, 1.5.59, 1.5.60, 1.5.61, 1.5.62, 1.5.63, 1.5.64, 1.5.65, 1.5.66, 1.5.67, 1.5.68, 1.5.69, 1.5.70, 1.5.71, 1.5.72, 1.5.73, 1.5.74, 1.5.75, 1.5.76, 1.5.77, 1.5.78, 1.5.79, 1.5.80, 1.5.81, 1.5.82, 1.5.83, 1.5.84, 1.5.85, 1.5.86, 1.5.87, 1.5.88, 1.5.89, 1.5.90, 1.5.91, 1.5.92, 1.5.93, 1.5.94, 1.5.95, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.7.12, 1.7.13, 1.7.14, 1.7.15, 1.7.16, 1.7.17, 1.7.18, 1.7.19, 1.7.20, 1.7.21, 1.7.22, 1.7.23, 1.7.24, 1.7.25, 1.7.26, 1.7.27, 1.7.28, 1.7.29, 1.7.30, 1.7.31, 1.7.32, 1.7.33, 1.7.34, 1.7.35, 1.7.36, 1.7.37, 1.7.38, 1.7.39, 1.7.40, 1.7.41, 1.7.42, 1.7.43, 1.7.44, 1.7.45, 1.7.46, 1.7.47, 1.7.48, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13, 1.8.14, 1.8.15, 1.8.16, 1.8.17, 1.8.18, 1.8.19, 1.8.20, 1.8.21, 1.8.22, 1.8.23, 1.8.24, 1.8.25, 1.8.26, 1.8.27, 1.8.28, 1.8.29, 1.8.30, 1.8.31, 1.8.32, 1.8.33, 1.8.34, 1.8.35, 1.8.36, 1.8.37, 1.8.38, 1.8.39, 1.8.40, 1.8.41, 1.8.42)
No matching distribution found for botocore==1.8.43 (from awscli->fastai)
while running !pip install fastai
Anyone experiencing this


(Himalayas) #55

Fixed the same by downloading latest
https://pypi.python.org/packages/89/c4/6c04c35b151be978239d0f6d49ab8b689a50804bd23f986068f75187a568/botocore-1.8.44.tar.gz, extracting it and python setup.py install.


(Savio) #56

Thanks!


(Sharwon Pius) #57

It’s a bit long. But, this would give you a deep understanding of the google colab environment.


#58

@manikanta_sManikanta

Hi, I am signed into Colaboratory with my gmail account. I loaded the Fastai lesson1 notebook and saved it to my Google Drive. But I can not run any of the cells in the notebook.

I click File > Open recent, and the notebook is loaded from Google Drive.

When I try to run any of the cells in the notebook I get the message:

Running read-only notebooks is not supported.

How can I run the notebook cells?

Thanks


#59

@manikanta_sManikanta

The notebook you provided on this website will not run for me in Colaboratory because it is read-only.

In Colaboratory I tried the method below to create a new notebook by coping the notebook you provided:

Select all cells in command mode (Ctrl+Shift+A)

Ctrl+C to copy all cells.

Open new notebook.

Ctrl+V to paste the copied cells.

But when I try to Open new notebook (New Python 3 notebook) if fails with this error message:

Notebook loading error
There was an error loading this notebook. Ensure that the file is accessible and try again.


[object Object]
Error: [object Object]
at d (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab_20180222_085323-RC01_186629092:1135:347)
at Object.next (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab_20180222_085323-RC01_186629092:1135:493)
at b (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab_20180222_085323-RC01_186629092:522:42)
at

I saved a copy of the notebook you provided to my Google Drive.
When I try to Open Drive notebook, and select the notebook copy it crashes with the same error message above.

When I change permissions of the notebook (you provided) on my Linux PC using chmod -R 777 then upload the file it crashes with the same error message above.

What else can I try?

Thanks


(Manikanta Yadunanda Sangu) #60

Hi,

I hope you need not do it. A better way is to open with collaboratory and create a new copy of it within collaboratory itself. It should work. You need not copy all of them manually.

Regards,
Manikanta