template_queue#

caput.pipeline.runner.template_queue(templatefile: os.PathLike, var: str, overwrite: Literal['never', 'failed'], profile: bool = False, profiler: str | None = 'cProfiler', psutil: bool = False, email: str | None = None, mailtype: str | None = None)[source]#

Queue a pipeline from the given templatefile.

Template variable substitutions are specified with –var <varname>=<val> arguments, with one for each variable. <val> may be a comma separated list, in which case item represents a separate value that is processed. Values must not contain a comma themselves. If multiple variables are specified, each with multiple substitutions the outer product of all possible values is generated.

Parameters:
templatefileos.PathLike

Path to a .yaml file containing the pipeline template.

varstr

Template variable substitutions.

overwrite{“never”, “failed”}

How to handle job directories which already exist. If “failed”, only jobs which have reported FAILED will be re-queued.

profilebool, optional

If True, use a profiler to monitor the time and resource usage of the pipeline job. Default is False.

profiler{“cprofile”, “pyinstrument”}, optional

Which profiler to use if profile is True. Default is cprofile.

psutilbool, optional

If True, use psutil to monitor the memory use of the pipeline job. Default is False.

emailstr | None, optional

Email address for job status notifications.

mailtypestr | None, optional

Types of job events for which to send email notifications. These are typically specific to the queue system used.