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: - BaseWmsWorkflow- Parsl-based workflow object to manage execution of workflow. - Parameters:
- namestr
- Unique name of workflow. 
- configlsst.ctrl.bps.BpsConfig
- Generic workflow config. 
- pathstr
- Path prefix for workflow output files. 
- jobsdictmappingstrtoParslJob
- Jobs to be executed. 
- parentsdictmappingstrto 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. 
- finalParslJob, 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:
- configBpsConfig
- Configuration of the workflow. 
- generic_workflowlsst.ctrl.bps.generic_workflow.GenericWorkflow
- Generic representation of a single workflow. 
- out_prefixstr
- Prefix for workflow output files. 
- service_classstr
- Full module name of WMS service class that created this workflow. 
 
- config
- Returns:
- selfParslWorkflow
- 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_prefixstr
- Root directory to be used for WMS workflow inputs and outputs as well as internal WMS files. 
 
- out_prefix
- Returns:
- selfParslWorkflow
- Constructed workflow. 
 
- self
 
 - restart()¶
- Restart the workflow after interruption. 
 - run(block: bool = True) list[concurrent.futures._base.Future | None]¶
- Run the workflow. - Parameters:
- Returns:
- futureslistofFuture
- Futureobjects linked to the execution of the endpoint jobs.
 
- futures
 
 - shutdown()¶
- Shut down the workflow. - This stops parsl. 
 - start()¶
- Start the workflow.