Hands-on session preparation before coming!
The school will be more profitable if you can run yourself the code during the hands-on session on your own laptop. The three hands-on will be run from python notebooks on GitHub.
There will be possibility to run on Google Colab (interactive ipython notebooks on Google cloud), for which you'll need a valid Google (or Gmail) account. You may get familiar with Google Colab before coming.
In addition, it will be possible to run on your laptop, for which you will need to install Anaconda *before* coming. See instructions below. More info :
- you can run all the school exercise on Google Colab, however the school is a good opportunity to get use with local installation because, unless you pay for a Google Colab pro account:
- you can only have one active Google Colab session
- a Google Colab session is limited in the amount of compute to order one hour (fine for tutorial, limiting for serious stuff)
- a Google Colab session will be killed as soon as it is idle for about 1 hour
- local installation of JuPyter lab if you have it should work as well for statistics and simple Machine Learning. Installing tensorflow on top of it should work.
- local proper installation of VSCode with Jupyter extension should work as well for statistics and simple Machine Learning. Installing tensorflow on top of it should work.
We will have informal debugging sessions on Monday end of afternoon.
Google Colab
Google Colab or Colaboratory is a cloud service, offered by Google, based on Jupyter Notebooks and intended for training and research in machine learning. This platform allows you to train Machine Learning models directly in the cloud. This means that you do not need to install anything on your computer except a browser. It allows you to write and execute Python code in your web browser. Note that for a better experience, it is preferable to run the Chrome browser for working with Colab.
What is a Jupyter Notebook?
Jupyter Notebook is an Open Source web application for creating and sharing documents containing code (executable directly in the document), equations, images and text. With this application it is possible to do data processing, statistical modelling, data visualization, Machine Learning, etc..
How to access it?
You need to use a Google account. If you don’t have one already, please register and create one. You will have access to a Google drive with a 15 GB storage space and to Google Colab. For this purpose go to: https://accounts.google.com/
Once done, have a look at the following page: https://colab.research.google.com/
Read the introduction to get an idea of what Colab is all about.
You are almost ready for the practice session.
The last step is to import a Python notebook (a ".ipynb" file) from GitHub into Colab and save it into your own Google Drive. For this purpose, click on the following link:
SOS_Welcome_To_Colaboratory.ipynb
then read it and play with the interactive cells.
Anaconda
We recommend that participants join with their laptop already properly configured, so that no time is lost in the session:
- with a Terminal emulator
- with anaconda installation (see below)
Anaconda installation
We recommend to install anaconda https://www.anaconda.com/download which includes the most common Machine Learning software suite (like sci-kit learn, matplotlib). Linux, Mac and Windows are supported. Either Graphical or Command Line installer works.
To test it:
- create directory sos2024 on your laptop
- download SOS_Welcome_To_Colaboratory.ipynb
open the notebook
Two techniques to do this :
- easiest:
start the application Anaconda-Navigator,
select Jupyter Notebook,
navigate to sos2024
click on SOS_Welcome_To_Colaboratory.ipynb
- recommended :
open a terminal
cd to sos2024
start the notebook by typing : jupyter notebook
if jupyter is not known, make sure anaconda installation is in your PATH with something like : export PATH="/somedir/anaconda/bin:$PATH"
click on SOS_Welcome_To_Colaboratory.ipynb in the tab that opened in you browser
Execute the notebook
For the very basics of Jupyter notebook interactivity, please check this short video
- Recommended method
click on first cell (the title!)
execute each cell by typing Shift-return (Mac) or Ctrl-return (PC) repeatedly. For non trivial cells with code, you'll see it takes a bit more time to recompute the output
change the content of the first cell (with seconds_in_a_day), and reexecute it
for the third cell with code (starting with import numpy),
you'll notice you don't see the figure.
add at the beginning : %matplotlib inline
re-run: you should see the figure
Installation of Tensorflow (without GPU configuration)
- Install Anaconda on your laptop using the previous instructions
- In a terminal window, type:
conda create -c conda-forge -n sos2024DL numpy pandas matplotlib ipykernel python=3.9
- Once the installation is done, type:
conda activate sos2024DL
pip install tensorflow
pip install notebook
- Then:
python -m ipykernel install --user --name=sos2024DL
- Launch Jupyter Notebook:
jupyter notebook
- Click on “New” in the top right hand corner and select the sos2024DL environment for your kernel
- Test that all libraries are all working well (you may have a warning message when you import tensorflow --> not a problem as we will not use GPUs during the deep learning hands-on session)