class lamindb.Run(transform: Transform, reference: Optional[str] = None, reference_type: Optional[str] = None)#

Bases: Registry

Runs of transforms.

  • transformTransform A Transform record.

  • referenceOptional[str] = None For instance, an external ID or a download URL.

  • reference_typeOptional[str] = None For instance, redun_id, nextflow_id or url.

See also


Track global run & transform records for a notebook or pipeline.


See guide: Data flow.

Typically, a run has inputs (run.inputs) and outputs (run.outputs):

  • References to outputs are also stored in the run field of File and Dataset.

  • References to inputs are also stored in the input_of field of File and Dataset.


>>> ln.Transform(name="Cell Ranger", version="7.2.0", type="pipeline").save()
>>> transform = ln.Transform.filter(name="Cell Ranger", version="7.2.0").one()
>>> run = ln.Run(transform)

Create a global run context:

>>> ln.track(transform)
>>>  # global available run

Track a notebook run:

>>> ln.track()  # Jupyter notebook metadata is automatically parsed


id BigAutoField

Internal id, valid only in one DB instance.

uid CharField

Universal id, valid across DB instances.

transform ForeignKey

The transform Transform that is being run.

run_at DateTimeField

Time of run execution.

created_by ForeignKey

Creator of record, a User.

report ForeignKey

Report of run, e.g., an html file.

is_consecutive BooleanField

Indicates whether code was consecutively executed. Is relevant for notebooks.

reference CharField

A reference like a URL or external ID (such as from a workflow manager).

reference_type CharField

Type of reference, e.g., a workflow manager execution ID.

created_at DateTimeField

Time of creation of record.