Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psteinb/2024-intro2ml-cern-school-of-computing
https://github.com/psteinb/2024-intro2ml-cern-school-of-computing
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/psteinb/2024-intro2ml-cern-school-of-computing
- Owner: psteinb
- License: bsd-3-clause
- Created: 2024-08-20T15:06:22.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-18T14:03:33.000Z (4 months ago)
- Last Synced: 2024-09-18T14:19:27.509Z (4 months ago)
- Language: Jupyter Notebook
- Size: 930 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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`.
0. clone this repo: `git clone https://github.com/psteinb/2024-intro2ml-cern-school-of-computing csc24-ml`
1. change into the repo root folder: `cd csc24-ml`
2. create a `venv` by `python -m venv py311 --upgrade-deps` (e.g. for python `3.11`)
3. setup that `venv` by doing `source py311/bin/activate`
4. (optional) install `uv` for faster installations (see [uv docs](https://github.com/astral-sh/uv))
5. 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:
```shell
uv pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
```
or without `uv`:
```shell
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:
0. open https://swan.cern.ch (provide your credentials if required)
1. you should be queried for the software environment to setup (if not use `...` in the top menue and click `Change configuration`)
Make the changes as highlighted below:
2. Under `My Projects`, click on `Download Project from git` (right hand side)
You should see this now:
3. insert the URL to this repo `https://github.com/psteinb/2024-intro2ml-cern-school-of-computing.git` (including a trailing `.git` suffix as indicated)
4. Hit `Download`!
5. You should see something like this
6. 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
2. Navigate to your project space. According to the steps outlined earlier, this should be:
``` shell
cd SWAN_projects/2024-intro2ml-cern-school-of-computing/
```*Note: if you altered the notebooks during the exercises, the following command might fail. Please git-stash your changes or move them out of the way by renaming and git-restoring them.*
3. perform a git pull
``` shell
git pull
```
This might look as much as:## Check your Software Stack
This repo has a small utility prepared which can check if you software environment is ready. Either run:
``` bash
python notebooks/00_intro2ml_envcheck.py
```
If you are running on SWAN and you receive the error relative to the missing package `mnist1d`, please run:
``` bash
python -m pip install --user mnist1d
```
or open the paired notebook `notebooks/00_intro2ml_envcheck.ipynb`, read the instructions and execute all cells.# Teaching this material
If you are an instructor, please see the [instructor notes](FOR_INSTRUCTORS.md).