-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpixi.toml
More file actions
94 lines (81 loc) · 3.2 KB
/
pixi.toml
File metadata and controls
94 lines (81 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[workspace]
name = "particleflow"
version = "2.5.0"
description = "Machine Learning for Particle Flow Reconstruction"
channels = ["conda-forge", "bioconda"]
platforms = ["linux-64"]
[dependencies]
python = ">=3.10"
snakemake = ">=8.0"
#python-htcondor = "==23.4.0"
#snakemake-executor-plugin-cluster-generic = "*"
#snakemake-executor-plugin-slurm = "*"
pyyaml = "*"
[pypi-dependencies]
comet-ml = "*"
#snakemake-executor-plugin-htcondor = { git = "https://github.com/htcondor/snakemake-executor-plugin-htcondor" }
[feature.tallinn.activation]
env = { SITE = "tallinn", PROFILE = ".profiles/tallinn", APPTAINER_ARGS = "-B /local -B /cvmfs -B /scratch/local -B /scratch/persistent --nv" }
[feature.lxplus.activation]
env = { SITE = "lxplus", PROFILE = ".profiles/lxbatch", APPTAINER_ARGS = "-B /afs -B /cvmfs -B /eos -B /etc/pki/ca-trust -B /etc/tnsnames.ora -B /run --nv" }
[feature.local.activation]
env = { SITE = "local", PROFILE = ".profiles/local", APPTAINER_ARGS = "-B /tmp -B /mnt --nv" }
[feature.tallinn.tasks]
setup = "sed -i '0,/^ <<: \\*.*$/s// <<: \\*tallinn/' particleflow_spec.yaml"
init = """
mkdir -p .profiles/tallinn \
&& echo '#!/bin/bash
# properties = {properties}
{exec_job}' > .profiles/tallinn/jobscript.sh \
&& echo 'executor: "slurm"
jobscript: "jobscript.sh"
jobs: unlimited
restart-times: 0
max-jobs-per-second: 10
max-status-checks-per-second: 10
verbose: true
use-conda: false
default-resources:
- slurm_account="hepusers"' > .profiles/tallinn/config.v8+.yaml
"""
[feature.lxplus.tasks]
setup = "sed -i '0,/^ <<: \\*.*$/s// <<: \\*lxplus/' particleflow_spec.yaml"
init = """
mkdir -p .profiles/lxbatch \
&& mkdir -p .condor_jobs \
&& echo 'executor: "htcondor"
htcondor-jobdir: ".condor_jobs"
jobs: 100
max-jobs-per-second: 10
max-status-checks-per-second: 10
restart-times: 0
local-cores: 1
verbose: false
default-resources:
- getenv=True
- job_wrapper="scripts/lxplus/test_wrapper.sh"' > .profiles/lxbatch/config.v8+.yaml
"""
[feature.local.tasks]
setup = "sed -i '0,/^ <<: \\*.*$/s// <<: \\*local/' particleflow_spec.yaml"
init = """
mkdir -p .profiles/local \
&& echo 'executor: "local"
jobs: 1
restart-times: 0
local-cores: 1
verbose: false' > .profiles/local/config.v8+.yaml
"""
[tasks]
# Unified generation step
generate = { cmd = "bash -c 'PYTHONPATH=. python3 mlpf/produce_snakemake.py --production ${PROD:-cms_run3} --model \"${MODEL:-}\" --steps ${STEPS:-gen,post,tfds,train}'", depends-on = ["setup"] }
# Unified run step
run = { cmd = "bash -c 'snakemake --workflow-profile $PROFILE --snakefile snakemake_jobs/${PROD:-cms_run3}/Snakefile --use-apptainer --apptainer-args \"$APPTAINER_ARGS\" --cores ${CORES:-1}'", depends-on = ["generate"] }
# Unified validation step
validation = { cmd = "bash -c 'PYTHONPATH=. python3 mlpf/produce_validation_snakemake.py --config ${VAL_CONFIG:-validation_cms.yaml} && snakemake --workflow-profile $PROFILE --snakefile snakemake_jobs/validation_${PROD:-cms_run3}/Snakefile --use-apptainer --apptainer-args \"$APPTAINER_ARGS\" --cores 1'", depends-on = ["setup"] }
# Local dry-run
dry-run = "bash -c 'snakemake --snakefile snakemake_jobs/${PROD:-cms_run3}/Snakefile --dry-run'"
[environments]
tallinn = ["tallinn"]
lxplus = ["lxplus"]
local = ["local"]
default = ["tallinn"]