Skip to content

fischll/2024-intro2ml-cern-school-of-computing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter Notebooks for the 2024 CERN School of Computing Course on Machine Learning

https://indico.cern.ch/event/1376644/

installation instructions for local execution

Some dependencies are rather hard to install for this workflow. The requirements.txt was tested with python 3.9 to 3.12.

  1. clone this repo: git clone https://github.com/psteinb/2024-intro2ml-cern-school-of-computing csc24-ml
  2. change into the repo root folder: cd csc24-ml
  3. create a venv by python -m venv py311 --upgrade-deps (e.g. for python 3.11)
  4. setup that venv by doing source py311/bin/activate
  5. (optional) install uv for faster installations (see uv docs)
  6. either do uv pip install -r ./requirements.txt or plain python -m pip install -r ./requirements.txt

If you like to train cpu-only, you can install torch without CUDA support. This is best beformed between step 2 and 4 in the recipe above by running:

uv pip install --extra-index-url https://download.pytorch.org/whl/cpu torch

or without uv:

python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu torch

Usage on SWAN

If you want to use the CERN SWAN system, here is a brief intro on how to do it:

  1. open https://swan.cern.ch (provide your credentials if required)

  2. you should be queried for the software environment to setup (if not use ... in the top menue and click Change configuration)

default SWAN software environment
Make the changes as highlighted below:
edited SWAN software environment
  1. Under My Projects, click on Download Project from git (right hand side)
SWAN projects landing page
You should see this now:
SWAN git project URL
  1. insert the URL to this repo https://github.com/psteinb/2024-intro2ml-cern-school-of-computing.git (including a trailing .git suffix as indicated)
SWAN git project filled correctly
  1. Hit Download!

  2. You should see something like this

SWAN git project correctly downloaded
  1. Please open notebooks/00_intro2ml_envcheck.ipynb. Read and run all cells!

Updating your project

If this repo changes, you may want to update your version of this repository on SWAN. To do this, you have to follow these 2 steps:

  1. Open a terminal in the SWAN webgui
SWAN terminal
  1. Navigate to your project space. According to the steps outlined earlier, this should be:
cd SWAN_projects/2024-intro2ml-cern-school-of-computing/
  1. perform a git pull
git pull

This might look as much as:

SWAN terminal

Check your Software Stack

This repo has a small utility prepared which can check if you software environment is ready. Either run:

python notebooks/00_intro2ml_envcheck.py

or open the paired notebook notebooks/00_intro2ml_envcheck.ipynb and execute all cells.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 51.9%
  • Python 36.9%
  • TeX 10.6%
  • Makefile 0.6%