-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implemented passing memory requirements, removed mandatary queue spec #33
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
description: HSC-PANDA | ||
instrument: lsst.obs.subaru.HyperSuprimeCam | ||
imports: | ||
- | ||
location: "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/obs_subaru/21.0.0-33-g9da9dc4e+fb9fd5bfd4/pipelines/DRP.yaml" | ||
exclude: | ||
- fgcm | ||
- jointcal | ||
- skyCorr | ||
tasks: | ||
makeWarp: | ||
class: lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask | ||
config: | ||
useGlobalExternalPhotoCalib: False | ||
doApplyExternalPhotoCalib: False | ||
doApplyExternalSkyWcs: False | ||
doApplySkyCorr: False | ||
assembleCoadd: | ||
class: lsst.pipe.tasks.assembleCoadd.CompareWarpAssembleCoaddTask | ||
config: | ||
useGlobalExternalPhotoCalib: False | ||
doApplyExternalPhotoCalib: False | ||
doApplyExternalSkyWcs: False | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,10 @@ class RubinTask: | |
step: str = None | ||
queue: str = None | ||
executable: str = None | ||
maxwalltime: int = None | ||
maxattempt: int = None | ||
maxwalltime: int = None # Maximum allowed walltime in seconds | ||
maxattempt: int = None # Maximum number of jobs attempts in a task | ||
maxrss: int = None # Maximum size of RAM to be used by a job | ||
cloud: str = None | ||
lfns: list = None | ||
local_pfns: list = None | ||
dependencies: list = None | ||
|
@@ -42,9 +44,7 @@ def __init__(self, bps_workflow, config): | |
self.tasks_inputs = {} | ||
self.jobs_steps = {} | ||
self.tasks_steps = {} | ||
self.himem_tasks = set(config.get("himem_steps")) | ||
self.computing_queue = config.get("computing_queue") | ||
self.computing_queue_himem = config.get("computing_queue_himem") | ||
self.computing_cloud = config.get("computing_cloud") | ||
self.qgraph_file = os.path.basename(config['bps_defined']['run_qgraph_file']) | ||
_, v = config.search("maxwalltime", opt={"default": 90000}) | ||
self.maxwalltime = v | ||
|
@@ -96,11 +96,15 @@ def define_tasks(self): | |
task = RubinTask() | ||
task.step = task_name | ||
task.name = task.step | ||
task.queue = self.computing_queue_himem if self.tasks_steps[task_name] \ | ||
in self.himem_tasks else self.computing_queue | ||
bps_node = next(filter(lambda x: x['job'].label == self.tasks_steps[task_name], | ||
self.bps_workflow.nodes.values()))['job'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I got it right it looks like, for each task, you iterate over all nodes of the generic workflow to find a node with a job having a specific label. Is there a reason why you can't create and use some kind of a "lookup table" (for example, a dictionary mapping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filter provides the iterator and the values are computed lazy. This is why the next function will lead to finding only a single bps workflow node per task. The lookup table could do the same, I agree, but will require an extra variable. I would leave as it is now, if it is OK with you. Thank you! |
||
|
||
task.queue = bps_node.compute_site | ||
task.lfns = list(jobs) | ||
task.maxattempt = self.maxattempt | ||
task.maxwalltime = self.maxwalltime | ||
task.maxrss = bps_node.request_memory | ||
task.cloud = self.computing_cloud | ||
|
||
# We take the commandline only from the first job because PanDA uses late binding and | ||
# command line for each job in task is equal to each other in exception to the processing | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a brief description to each field of this data class? (It would be nice if the descriptions for
maxwalltime
andmaxrss
include information about the units they use, e.g., if the walltime needs to be specified in seconds, minutes, etc.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've added the suggested comment.