Skip to content

Commit

Permalink
Split up default target rule into 3 rules so that proper dependency i…
Browse files Browse the repository at this point in the history
…s obeyed. Execute snakemake all1/2/3 in sequence to avoid errors
  • Loading branch information
rahmans1 committed Jan 25, 2024
1 parent d81ab52 commit 805c2cd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions benchmarks/roman_pots/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,23 @@ MODEL_VERSION = [
]
INPUT_STEERING_FILE = "steering_file.py"

rule all:
rule all1:
input:
expand("results/"+str(DETECTOR_VERSION)+"/{detector_config}/detector_benchmarks/"+str(SUBSYSTEM)+"/"+str(BENCHMARK)+"/raw_data/"+str(DETECTOR_VERSION)+"_{detector_config}_{index}.edm4hep.root",
detector_config=DETECTOR_CONFIG,
index=NFILES),
expand("results/"+str(DETECTOR_VERSION)+"/{detector_config}/detector_benchmarks/"+str(SUBSYSTEM)+"/"+str(BENCHMARK)+"/processed_data/"+str(DETECTOR_VERSION)+"_{detector_config}_{index}.txt",
detector_config=DETECTOR_CONFIG,
index=NFILES),
expand("results/"+str(DETECTOR_VERSION)+"/{detector_config}/detector_benchmarks/"+str(SUBSYSTEM)+"/"+str(BENCHMARK)+"/metadata/"+str(DETECTOR_VERSION)+"_{detector_config}_"+str(SUBSYSTEM)+"_"+str(BENCHMARK)+"_{model_version}.txt",
detector_config=DETECTOR_CONFIG,
model_version=MODEL_VERSION),
model_version=MODEL_VERSION)

rule all2:
input:
expand("results/"+str(DETECTOR_VERSION)+"/{detector_config}/detector_benchmarks/"+str(SUBSYSTEM)+"/"+str(BENCHMARK)+"/processed_data/"+str(DETECTOR_VERSION)+"_{detector_config}_{index}.txt",
detector_config=DETECTOR_CONFIG,
index=NFILES)

rule all3:
input:
expand("results/"+str(DETECTOR_VERSION)+"/{detector_config}/detector_benchmarks/"+str(SUBSYSTEM)+"/"+str(BENCHMARK)+"/trained_models/model_pz_"+str(DETECTOR_VERSION)+"_{detector_config}_"+str(SUBSYSTEM)+"_"+str(BENCHMARK)+"_{model_version}.pt",
detector_config=DETECTOR_CONFIG,
model_version=MODEL_VERSION),
Expand All @@ -75,8 +81,6 @@ rule all:
detector_config=DETECTOR_CONFIG,
model_version=MODEL_VERSION)



rule roman_pots_generate_events:
input:
output:
Expand Down

0 comments on commit 805c2cd

Please sign in to comment.