lamindb.Run¶
- class lamindb.Run(transform: Transform, reference: str | None = None, reference_type: str | None = None)¶
-
Runs of transforms.
- Parameters:
transform –
Transform
ATransform
record.reference –
str | None = None
For instance. n 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.
A run can have inputs and outputs:
References to outputs are stored in the
run
field of registries.References to inputs are 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
Attributes¶
-
params:
ParamManager
¶ Param manager.
What
.features
is to dataset-like artifacts,.params
is to model-like artifacts.Curate with params & values:
artifact.params.add_values({ "hidden_size": 32, "bottleneck_size": 16, "batch_size": 32 })
Fields¶
-
id:
int
¶ Internal id, valid only in one DB instance.
-
uid:
str
¶ Universal id, valid across DB instances.
-
started_at:
datetime
¶ Start time of run.
-
finished_at:
datetime
¶ Finished time of run.
-
environment:
Artifact
¶ Computational environment for the run.
For instance.
Dockerfile
. docker image.requirements.txt
. nenvironment.yml
, etc.
-
is_consecutive:
bool
¶ Indicates whether code was consecutively executed. Is relevant for notebooks.
-
reference:
str
¶ A reference like a URL or external ID (such as from a workflow manager).
-
reference_type:
str
¶ Type of reference, e.g.. workflow manager execution ID.
-
param_values:
ParamValue
¶ Parameter values.
-
created_at:
datetime
¶ Time of first creation. Mismatches
started_at
if the run is re-run.
Methods¶
- delete()¶
- Return type:
None