Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 8 additions & 1 deletion lawluigi_configs/KingMaker_luigi.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ only_missing = True
; bootstrap file to be sourced at beginning of htcondor jobs (relative PATH to framework.py)
bootstrap_file = setup_law_remote.sh
files_per_task = 10

; If some datasets are known to result in files with large number of events a lower number
; of files per task can be set for these datasets to avoid long runtimes. This is a mapping
; based of dataset name to number of files per task following "sample_type" key of
; sample_database collectuib e.g. {"ttbar": 3, "wjets": 20}.
Comment thread
a-monsch marked this conversation as resolved.
Outdated
custom_files_per_task = {"ttbar": 5, "wjets": 20}
Comment thread
a-monsch marked this conversation as resolved.
Outdated
Comment thread
a-monsch marked this conversation as resolved.
Outdated

; scopes and shifts are to be provided in the config, or as command line arguments via --scope and --shift
; in both cases, the values are expected to be comma-separated lists without spaces or quotes
scopes = mt,et
Expand Down Expand Up @@ -112,4 +119,4 @@ friend_mapping = {}
silent = True
; set to False to print out the datasets

[QuantitiesMap]
[QuantitiesMap]
2 changes: 1 addition & 1 deletion processor/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Task(law.Task):
description="Tag to differentiate workflow runs. Set to a timestamp as default.",
)
nanoAOD_version = luigi.Parameter(
default=NanoAODVersions.v12.value,
default=NanoAODVersions.v9.value,
description="Version of the NanoAOD files that are used in the analysis. 'NanoAOD_v12' is the default.",
)
Comment thread
a-monsch marked this conversation as resolved.
Comment thread
a-monsch marked this conversation as resolved.

Expand Down
5 changes: 5 additions & 0 deletions processor/tasks/CROWNBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ class CROWNExecuteBase(HTCondorWorkflow, law.LocalWorkflow):
analysis = luigi.Parameter()
config = luigi.Parameter()
files_per_task = luigi.IntParameter()
custom_files_per_task = luigi.DictParameter(
default={},
significant=False,
description="Map specific nicks to custom files_per_task",
Comment thread
a-monsch marked this conversation as resolved.
Outdated
)

def htcondor_output_directory(self):
return law.LocalDirectoryTarget(self.local_path(f"htcondor_files/{self.nick}"))
Expand Down
4 changes: 4 additions & 0 deletions processor/tasks/CROWNRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def create_branch_map(self):
if len(inputdata["filelist"]) == 0:
raise Exception("No files found for dataset {}".format(self.nick))
files_per_task = self.files_per_task
for pattern, custom_fpt in self.custom_files_per_task.items():
if pattern == self.sample_type:
files_per_task = int(custom_fpt)
break
Comment thread
a-monsch marked this conversation as resolved.
Outdated
if self.sample_type == "data" and any(
era in self.nick for era in self.problematic_eras
):
Expand Down
Loading