Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ jobs:
name: pp-2016-MU-Sim10b-${{ github.head_ref }}
snakemake_dir: pidgan
target: cache_container validate_all
main_runner: aiinfn-lamarrsim-4gpus
model_prefix: pid
additional_config: |
storage_folder: pid-2016MagUp-Sim10b

additional_profile: |
jobs: 1
jobs: 4
cores: 32

resources:
mem_mb: 500000
millicpu: 32000
gpu: 4
connections_to_storage: 2

generated_model_path: /tmp/compiled_model.c
secrets:
Expand Down
2 changes: 1 addition & 1 deletion pidgan/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apptainer_cached_image: /tmp/lb-pidsim-train.sif
sample: 2016MU
storage_folder: tests
temp_dir: /tmp
training_time_limit_seconds: 600
training_time_limit_seconds: 1200
entries_for_validation: 1000000

nbconvert_args:
Expand Down
6 changes: 4 additions & 2 deletions pidgan/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ rule preprocessing:
resources:
cpu=8,
mem_mb=32000,
gpu=0
gpu=0,
connections_to_storage=1,

shell:
"""
Expand Down Expand Up @@ -265,7 +266,8 @@ rule validate:
resources:
cpu=4,
mem_mb=15000,
gpu=0
gpu=0,
connections_to_storage=1,

shell:
"""
Expand Down
12 changes: 10 additions & 2 deletions pidgan/workflow/notebooks/Deploy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "73cdaffe-5f9a-421e-8108-009115be1b94",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"name": "stderr",
Expand All @@ -23,7 +29,9 @@
"import scikinC\n",
"from datetime import datetime\n",
"import hashlib\n",
"from preprocessing_utils import ProbNNTransformer_fwd, ProbNNTransformer_bwd"
"from preprocessing_utils import ProbNNTransformer_fwd, ProbNNTransformer_bwd\n",
"from gpu_picker import request_gpu\n",
"print(\"Request gpu:\", request_gpu(False))"
]
},
{
Expand Down
18 changes: 16 additions & 2 deletions pidgan/workflow/notebooks/GlobalPID-im-preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "28185ab6-475a-4e7e-82ed-9293c407146d",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Preprocessing steps for _GlobalPID_ models (for isMuon=True)"
]
Expand All @@ -12,7 +18,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "9330759e-6339-4cd9-bd04-8426edb4ebeb",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
Expand All @@ -33,6 +45,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"PARTICLE = os.environ.get(\"PARTICLE\", \"muon\")\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -42,6 +55,7 @@
" * PARTICLE: `{PARTICLE}`\n",
" * LOCAL: `{LOCAL}`\n",
" * SAMPLE: `{SAMPLE}`\n",
" * REQUESTED GPU: `{request_gpu(False)}`\n",
"\"\"\")"
]
},
Expand Down
18 changes: 16 additions & 2 deletions pidgan/workflow/notebooks/GlobalPID-im-train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "496d2ab8-65b0-4113-bf74-edaed195fae2",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Training of the _GlobalPID_ model for particles passing the isMuon criterion\n",
"\n",
Expand All @@ -16,7 +22,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "90f91f2f-e0d2-4873-8990-21116d927d03",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
Expand All @@ -39,6 +51,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
"TEST = os.environ.get(\"TEST\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -50,6 +63,7 @@
" * SAMPLE: `{SAMPLE}`\n",
" * TEST: `{TEST}`\n",
" * PARTICLE: `{PARTICLE}`\n",
" * REQUESTED GPU: `{request_gpu(True)}`\n",
"\"\"\")"
]
},
Expand Down
20 changes: 17 additions & 3 deletions pidgan/workflow/notebooks/GlobalPID-nm-preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "9800a068-ce09-45a1-ae4a-6edec0747e13",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Preprocessing steps for _GlobalPID_ models (for isMuon=False)"
]
Expand All @@ -12,7 +18,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "f095e84c-a1ec-4ffc-9384-6cc06ef6eeb3",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
Expand All @@ -34,6 +46,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"PARTICLE = os.environ.get(\"PARTICLE\", \"muon\")\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -42,7 +55,8 @@
"Markdown(f\"\"\"\n",
" * PARTICLE: `{PARTICLE}`\n",
" * LOCAL: `{LOCAL}`\n",
" * SAMPLE: `{SAMPLE}`\n",
" * SAMPLE: `{SAMPLE}` \n",
" * REQUESTED GPU: `{request_gpu(False)}`\n",
"\"\"\")"
]
},
Expand Down
18 changes: 16 additions & 2 deletions pidgan/workflow/notebooks/GlobalPID-nm-train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "496d2ab8-65b0-4113-bf74-edaed195fae2",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Training of the _GlobalPID_ model for particles **NOT** passing the isMuon criterion\n",
"\n",
Expand All @@ -16,7 +22,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "90f91f2f-e0d2-4873-8990-21116d927d03",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
Expand All @@ -39,6 +51,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
"TEST = os.environ.get(\"TEST\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -49,6 +62,7 @@
" * LOCAL: `{LOCAL}`\n",
" * SAMPLE: `{SAMPLE}`\n",
" * TEST: `{TEST}`\n",
" * REQUESTED GPU: `{request_gpu(True)}`\n",
" * PARTICLE: `{PARTICLE}`\n",
"\"\"\")"
]
Expand Down
27 changes: 24 additions & 3 deletions pidgan/workflow/notebooks/Muon-preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,33 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Preprocessing steps for _MUON_ models"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
" * PARTICLE: `muon`\n",
" * LOCAL: `True`\n",
" * SAMPLE: `2016MU`\n"
],
Expand All @@ -31,6 +44,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"PARTICLE = os.environ.get(\"PARTICLE\", \"muon\")\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -40,12 +54,19 @@
" * PARTICLE: `{PARTICLE}`\n",
" * LOCAL: `{LOCAL}`\n",
" * SAMPLE: `{SAMPLE}`\n",
" * REQUESTED GPU: `{request_gpu(False)}`\n",
"\"\"\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"## Technologies and libraries\n",
"\n",
Expand Down
19 changes: 17 additions & 2 deletions pidgan/workflow/notebooks/Muon-train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "496d2ab8-65b0-4113-bf74-edaed195fae2",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Training of the _Muon_ model \n",
"\n",
Expand All @@ -16,7 +22,13 @@
"cell_type": "code",
"execution_count": 1,
"id": "90f91f2f-e0d2-4873-8990-21116d927d03",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
Expand All @@ -39,6 +51,7 @@
"source": [
"import os\n",
"from IPython.display import Markdown\n",
"from gpu_picker import request_gpu\n",
"\n",
"LOCAL = os.environ.get(\"LOCAL\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
"TEST = os.environ.get(\"TEST\", \"yes\").lower() in ['y', 'yes', 'true', '1']\n",
Expand All @@ -50,6 +63,8 @@
" * SAMPLE: `{SAMPLE}`\n",
" * TEST: `{TEST}`\n",
" * PARTICLE: `{PARTICLE}`\n",
" * REQUESTED GPU: `{request_gpu(True)}`\n",
"\n",
"\"\"\")"
]
},
Expand Down
Loading
Loading