ParslWorkflow¶
- class lsst.ctrl.bps.parsl.ParslWorkflow(name: str, config: BpsConfig, path: str, jobs: dict[str, lsst.ctrl.bps.parsl.job.ParslJob], parents: Mapping[str, Iterable[str]], endpoints: Iterable[str], final: ParslJob | None = None)¶
Bases:
BaseWmsWorkflowParsl-based workflow object to manage execution of workflow.
- Parameters:
- name
str Unique name of workflow.
- config
lsst.ctrl.bps.BpsConfig Generic workflow config.
- path
str Path prefix for workflow output files.
- jobs
dictmappingstrtoParslJob Jobs to be executed.
- parents
dictmappingstrto iterable ofstr Dependency tree. Keywords are job names, and values are a list of job names that must be executed before the keyword job name can be executed.
- endpointsiterable of
str Endpoints of the dependency tree. These jobs (specified by name) have no children.
- final
ParslJob, optional Final job to be done, e.g., to merge the execution butler. This is done locally.
- name
Methods Summary
execute(name)Execute a job.
Run final jobs.
from_generic_workflow(config, ...)Create a ParslWorkflow object from a BPS GenericWorkflow.
Run initial jobs.
load_dfk()Load data frame kernel.
read(out_prefix)Construct from the saved workflow state.
restart()Restart the workflow after interruption.
run([block])Run the workflow.
shutdown()Shut down the workflow.
start()Start the workflow.
write(out_prefix)Write workflow state.
Methods Documentation
- finalize_jobs()¶
Run final jobs.
These jobs are run locally after all other jobs are complete.
This is used to merge the execution butler.
- classmethod from_generic_workflow(config: BpsConfig, generic_workflow: GenericWorkflow, out_prefix: str, service_class: str) BaseWmsWorkflow¶
Create a ParslWorkflow object from a BPS GenericWorkflow.
- Parameters:
- config
BpsConfig Configuration of the workflow.
- generic_workflow
lsst.ctrl.bps.generic_workflow.GenericWorkflow Generic representation of a single workflow.
- out_prefix
str Prefix for workflow output files.
- service_class
str Full module name of WMS service class that created this workflow.
- config
- Returns:
- self
ParslWorkflow Constructed workflow.
- self
- initialize_jobs()¶
Run initial jobs.
These jobs are run locally before any other jobs are submitted to parsl.
This is used to set up the butler.
- load_dfk()¶
Load data frame kernel.
This starts parsl.
- classmethod read(out_prefix: str) ParslWorkflow¶
Construct from the saved workflow state.
- Parameters:
- out_prefix
str Root directory to be used for WMS workflow inputs and outputs as well as internal WMS files.
- out_prefix
- Returns:
- self
ParslWorkflow Constructed workflow.
- self
- restart()¶
Restart the workflow after interruption.
- run(block: bool = True) list[concurrent.futures._base.Future | None]¶
Run the workflow.
- Parameters:
- Returns:
- futures
listofFuture Futureobjects linked to the execution of the endpoint jobs.
- futures
- shutdown()¶
Shut down the workflow.
This stops parsl.
- start()¶
Start the workflow.