From d6c32a45d36617d2abc2e6e4a7401829736abfa6 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 12 Nov 2024 12:16:50 -0500 Subject: [PATCH 1/2] benchmarks/ecal_gaps: move output to results/{DETECTOR_CONFIG} --- benchmarks/ecal_gaps/Snakefile | 8 +++----- benchmarks/ecal_gaps/config.yml | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/benchmarks/ecal_gaps/Snakefile b/benchmarks/ecal_gaps/Snakefile index df6107a5..76d32c05 100644 --- a/benchmarks/ecal_gaps/Snakefile +++ b/benchmarks/ecal_gaps/Snakefile @@ -49,23 +49,20 @@ exec env DETECTOR_CONFIG={wildcards.DETECTOR_CONFIG} \ """ -DETECTOR_CONFIG=os.environ["DETECTOR_CONFIG"] - rule ecal_gaps: input: matplotlibrc=".matplotlibrc", script="benchmarks/ecal_gaps/ecal_gaps.py", # TODO pass as a file list? _=expand( - "sim_output/ecal_gaps/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX:04d}.eicrecon.tree.edm4eic.root", - DETECTOR_CONFIG=DETECTOR_CONFIG, + "sim_output/ecal_gaps/{{DETECTOR_CONFIG}}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX:04d}.eicrecon.tree.edm4eic.root", PARTICLE=["e-"], ENERGY=["500MeV", "5GeV", "20GeV"], PHASE_SPACE=["3to50deg", "45to135deg", "130to177deg"], INDEX=range(1), ), output: - directory("results/ecal_gaps"), + directory("results/{DETECTOR_CONFIG}/ecal_gaps"), threads: workflow.cores shell: """ @@ -85,5 +82,6 @@ WORKER_PID=$! env \ MATPLOTLIBRC={input.matplotlibrc} \ OUTPUT_DIR={output} \ +DETECTOR_CONFIG={wildcards.DETECTOR_CONFIG} \ python {input.script} """ diff --git a/benchmarks/ecal_gaps/config.yml b/benchmarks/ecal_gaps/config.yml index 9c0a8a09..f4a5710b 100644 --- a/benchmarks/ecal_gaps/config.yml +++ b/benchmarks/ecal_gaps/config.yml @@ -4,7 +4,7 @@ sim:ecal_gaps: script: - mkdir -p $LOCAL_DATA_PATH/input - ln -s $LOCAL_DATA_PATH/input input - - snakemake $SNAKEMAKE_FLAGS --cache --cores 10 ecal_gaps --omit-from ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cache --cores 10 results/epic/ecal_gaps --omit-from ecal_gaps bench:ecal_gaps: extends: .det_benchmark @@ -15,7 +15,7 @@ bench:ecal_gaps: - ln -s $LOCAL_DATA_PATH/input input - export PYTHONUSERBASE=$LOCAL_DATA_PATH/deps - pip install -r benchmarks/ecal_gaps/requirements.txt - - snakemake $SNAKEMAKE_FLAGS --cores 8 ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cores 8 results/epic/ecal_gaps collect_results:ecal_gaps: extends: .det_benchmark @@ -25,5 +25,5 @@ collect_results:ecal_gaps: script: - ls -lrht - mv results{,_save}/ # move results directory out of the way to preserve it - - snakemake $SNAKEMAKE_FLAGS --cores 1 --delete-all-output ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cores 1 --delete-all-output results/epic/ecal_gaps - mv results{_save,}/ From eee879709358f9ba03e0912bf2bd477fc8ec1647 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 12 Nov 2024 12:17:53 -0500 Subject: [PATCH 2/2] benchmarks/ecal_gaps: switch to epic_inner_detector configuration --- benchmarks/ecal_gaps/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/ecal_gaps/config.yml b/benchmarks/ecal_gaps/config.yml index f4a5710b..fdf31892 100644 --- a/benchmarks/ecal_gaps/config.yml +++ b/benchmarks/ecal_gaps/config.yml @@ -4,7 +4,7 @@ sim:ecal_gaps: script: - mkdir -p $LOCAL_DATA_PATH/input - ln -s $LOCAL_DATA_PATH/input input - - snakemake $SNAKEMAKE_FLAGS --cache --cores 10 results/epic/ecal_gaps --omit-from ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cache --cores 10 results/epic_inner_detector/ecal_gaps --omit-from ecal_gaps bench:ecal_gaps: extends: .det_benchmark @@ -15,7 +15,7 @@ bench:ecal_gaps: - ln -s $LOCAL_DATA_PATH/input input - export PYTHONUSERBASE=$LOCAL_DATA_PATH/deps - pip install -r benchmarks/ecal_gaps/requirements.txt - - snakemake $SNAKEMAKE_FLAGS --cores 8 results/epic/ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cores 8 results/epic_inner_detector/ecal_gaps collect_results:ecal_gaps: extends: .det_benchmark @@ -25,5 +25,5 @@ collect_results:ecal_gaps: script: - ls -lrht - mv results{,_save}/ # move results directory out of the way to preserve it - - snakemake $SNAKEMAKE_FLAGS --cores 1 --delete-all-output results/epic/ecal_gaps + - snakemake $SNAKEMAKE_FLAGS --cores 1 --delete-all-output results/epic_inner_detector/ecal_gaps - mv results{_save,}/