Reference

API Reference

class asimov_pycbc.pycbc.PyCBC(production, category=None)[source]

Bases: Pipeline

The PyCBC Inference Pipeline integration for Asimov.

This class provides an interface between Asimov and pycbc_inference, handling config templating, job submission via Asimov’s scheduler abstraction, completion detection, and asset collection.

Parameters:
productionasimov.Production

The production object.

categorystr, optional

The category of the job. Defaults to “analyses”.

property config_template

The bundled Liquid template used to render a production’s .ini file when one doesn’t already exist in the event repository.

Asimov’s generic manage build step calls production.make_config(), which looks for this attribute on the pipeline (see Analysis.make_config in asimov core) before falling back to a template bundled inside asimov’s own package – which doesn’t ship a PyCBC template.

build_dag(dryrun=False)[source]

Resolve the run directory and the location of the rendered .ini file for this production.

pycbc_inference has no separate DAG-building step of its own – it is submitted directly as a single job (see submit_dag) – but asimov’s generic manage build submit CLI unconditionally calls build_dag on every pipeline before submit_dag, so this must exist.

submit_dag(dryrun=False)[source]

Submit a pycbc_inference job to the scheduler.

Uses Asimov’s scheduler abstraction (self.scheduler, HTCondor or Slurm) rather than hand-rolling htcondor/htcondor2 calls directly.

Parameters:
dryrunbool, optional

If True then the job will not be submitted, but the command and submit description will be printed to stdout.

Returns:
int

The cluster ID assigned to the submitted job.

Raises:
PipelineException

This will be raised if the pipeline fails to submit the job.

detect_completion()[source]

Check for the production of a posterior samples HDF5 file to signal that the job has completed.

samples()[source]

Collect the combined samples file for PESummary.

collect_assets()[source]

Gather the results assets for this job, so that a downstream production (for example a PESummary post-processing production wired up via needs:) can pick them up through production._previous_assets().

collect_logs()[source]

Collect all of the log files which have been produced by this production and return their contents as a dictionary.

after_completion()[source]

Mark this production as finished once its job has completed.

This deliberately does not reach out and submit a PESummary (or any other) post-processing job itself. Post-processing is instead expressed as its own, separate production with a needs: dependency on this one (see e.g. asimov-pesummary): Asimov’s own dependency resolution builds and submits that production once this one reaches finished, and it picks up this production’s samples via collect_assets() through production._previous_assets(). This matches the pattern used by other post-completion-only pipelines (e.g. the FakeCBCPipeline test pipeline in asimov-pesummary itself), and avoids this plugin needing any knowledge of what – if anything – consumes its output.

resurrect()[source]

Attempt to resurrect a failed or evicted job by resubmitting it.

pycbc_inference checkpoints its own progress, so resubmitting the same job (without --force, handled automatically by submit_dag) resumes from where it left off.

© Copyright 2026, Daniel Williams.
Created using Sphinx 9.1.0.