The Build Process
The pipelines which Asimov is designed to operate with typically use a configuration file to store the settings which will be required for the analysis, and may need access to a number of other auxilliary files.
Asimov is capable of generating or retrieving all of these files for the various pipelines it provides support for.
This document provides an overview of how an analysis is built, with pointers to the documentation for the individual steps.
asimov build
The command line utility asimov build
is used to construct pipeline configurations by combining a configuration template for the pipeline with data from the production ledger.
This runs the Production.make_config()
method, which determines the pipeline from the ledger.
If a template is provided in the metadata for the production (under the template
value) then this template is used to construct the configuration file.
Otherwise the appropriate pipeline configuration template is used (e.g. bilby.template
for the bilby
configuration).
Metadata is then substituted into the configuration file, and the final file is committed to the event’s repository, under than production’s name. For example, a production called Prod1
will produce an ini
file called Prod1.ini
.
This step does not require pipeline-specific code, and so it uses only code from the asimov.event
module.
This allows configurations to be generated in environments which do not have the pipelines installed.
The next step is then used to invoke pipeline-specific code.
asimov submit
Once a configuration has been generated it can be used to generate an htcondor
DAG file for execution on a cluster.
The process for this step is different for each analysis pipeline.
An object for that pipeline is then created with the metadata from the production.
First asimov submit
determines the correct pipeline for the production from the pipeline
value in the ledger.
First the build_dag
method is called on the pipeline object.
In general each pipeline will then execute the pipeline construction utility and any additional steps required to build a DAG file (for bilby
, for example, the bilby_pipe
tool is used to produce the DAG.
The second step performs the submission of the DAG to the cluster.
The submit_dag
method is called on the pipeline object.
In general a pipeline will first run its before_submit
method, which can be used by the pipeline to download any additional files, for example.
Then the DAG file is submitted to the htcondor
submit node using the condor_submit_dag
tool.
The cluster id
for the submitted DAG is then retrieved, and stored in the manifest under the job id
value for the production.