Repository with basic machine learning algorithms implemented in PyTorch.
The coffea files used as inputs are based on the output of PocketCoffea. In particular, the framework was developed based on the output of the AnalysisConfigs repository, which is a collection of analysis configurations for the PocketCoffea framework.
To create the micromamba environment, you can use the following command:
salloc --account gpu_gres --job-name "InteractiveJob" --c
6E00
pus-per-task 4 --mem-per-cpu 3000 --time 01:00:00 -p gpu --gres=gpu:1
micromamba env create -f ML_pytorch_env.yml
micromamba activate ML_pytorch
pip install -r requirements.txt
# install the package in editable mode
pip install -e .
To connect to a node with a gpu, you can use the following command:
# connect to a node with a gpu
salloc --account gpu_gres --job-name "InteractiveJob" --cpus-per-task 4 --mem-per-cpu 3000 --time 01:00:00 -p gpu --gres=gpu:1
# activate the environment
micromamba activate ML_pytorch
# check which gpu is available
echo $CUDA_VISIBLE_DEVICES # or echo $SLURM_JOB_GPUS
To execute an example training, evaluate the model on the test set, plot the history and plot the signal/background histograms, you can use the following command:
python ml_pytorch/scripts/train.py -c configs/example_DNN_config_ggF_VBF.yml
To execute 5 runs in a node without the interactive access to the GPU node (the given config and folder names are just examples):
# Outside of any node activate your environment (e.g. `micromamba activate ML_pytorch`)
# Then run this command:
sbatch --account gpu_gres --job-name "InteractiveJob" --cpus-per-task 4 --mem-per-cpu 5000 --time 12:00:00 -p gpu --gres=gpu:1 --wrap=". ./run_batch_of_5.sh /work/tharte/datasets/ML_pytorch/configs/bkg_reweighting/DNN_AN_1e-3_e20drop75_minDelta1em5_SPANet_postEE.yml out/bkg_reweighting/SPANET_ptFlat_20_runs_postEE 0"