lamindb.Run¶
- class lamindb.Run(transform: Transform, reference: str | None = None, reference_type: str | None = None)¶
Bases:
Registry
Runs of transforms.
- Parameters:
transform –
Transform
ATransform
record.reference –
str | None = None
For instance, an external ID or a download URL.reference_type –
str | None = None
For instance,redun_id
,nextflow_id
orurl
.
See also
track()
Track global run & transform records for a notebook or pipeline.
Notes
See guide: Data lineage.
Typically, a run has inputs (
run.inputs
) and outputs (run.outputs
):References to outputs are also stored in the
run
field ofArtifact
andCollection
.References to inputs are also stored in the
input_of
field ofArtifact
andCollection
.
Examples
>>> 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=transform) >>> ln.core.run_context.run # global available run
Track a notebook run:
>>> ln.track() # Jupyter notebook metadata is automatically parsed >>> ln.core.context.run
Fields
- 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.
- started_at DateTimeField
Start time of run.
- finished_at DateTimeField
Finished time of run.
- created_by ForeignKey
Creator of run, a
User
.
- report ForeignKey
Report of run, e.g., an html file.
- environment ForeignKey
Computational environment for the run.
For instance, a
Dockerfile
, a docker image, arequirements.txt
, anenvironment.yml
, etc.
- 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 first creation. Mismatches
started_at
if the run is re-run.
- param_values ManyToManyField
Parameter values.
Methods
- delete()¶
- Return type:
None