Skip to content
Snippets Groups Projects
Commit f8c83056 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal.dags: add suppress_with_remap option to Option/Argument to be used in DAG layers

parent a9b38bd8
No related branches found
No related tags found
1 merge request!41DAG Workflow Overhaul + OSG DAG support
......@@ -222,6 +222,11 @@ class Argument:
determine whether to define job arguments. This is typically used
when you want to track file I/O used by a job but isn't directly
specified in their commands. Off by default.
suppress_with_remap
Same as suppress but allowing transfer remaps to still occur.
Used when you want to track file output which is not directly
specified in their command but whose file locations changed
compared to their inputs. Off by default.
Examples
________
......@@ -237,6 +242,7 @@ class Argument:
argument: Union[int, float, str, List]
track: Optional[bool] = True
suppress: Optional[bool] = False
suppress_with_remap: Optional[bool] = False
def __post_init__(self):
# check against list of protected condor names/characters,
......@@ -249,6 +255,9 @@ class Argument:
self.argument = [self.argument]
self.argument = [str(arg) for arg in self.argument]
if self.suppress_with_remap:
self.suppress = True
@property
def arg_basename(self):
return [os.path.basename(arg) for arg in self.argument]
......@@ -287,6 +296,11 @@ class Option:
determine whether to define job arguments. This is typically used
when you want to track file I/O used by a job but isn't directly
specified in their commands. Off by default.
suppress_with_remap
Same as suppress but allowing transfer remaps to still occur.
Used when you want to track file output which is not directly
specified in their command but whose file locations changed
compared to their inputs. Off by default.
Examples
________
......@@ -304,6 +318,7 @@ class Option:
argument: Optional[Union[int, float, str, List]] = None
track: Optional[bool] = True
suppress: Optional[bool] = False
suppress_with_remap: Optional[bool] = False
def __post_init__(self):
# check against list of protected condor names/characters,
......@@ -317,6 +332,9 @@ class Option:
self.argument = [self.argument]
self.argument = [str(arg) for arg in self.argument]
if self.suppress_with_remap:
self.suppress = True
@property
def arg_basename(self):
return [os.path.basename(arg) for arg in self.argument]
......
......@@ -212,7 +212,7 @@ class Layer:
if not arg.suppress:
nodevars.update({f"{arg.condor_name}": arg.vars(basename=self.transfer_files)})
if self.transfer_files:
if not arg.suppress:
if not arg.suppress or arg.suppress_with_remap:
nodevars.update({f"output_{arg.condor_name}": arg.files(basename=True)})
nodevars.update({f"output_{arg.condor_name}_remap": arg.remaps()})
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment