lamindb.track¶
- lamindb.track(transform=None, *, params=None, new_run=None, path=None)¶
Initiate a run with tracked data lineage.
sets
transform
&run
by creating or loadingTransform
&Run
recordssaves compute environment as a
requirements.txt
file:run.environment
If
sync_git_repo
is set, checks whether a script-like transform exists in a git repository and links it.- Parameters:
transform (
str
|Transform
|None
, default:None
) – A transformuid
or record. IfNone
, creates auid
.params (
dict
|None
, default:None
) – A dictionary of parameters to track for the run.new_run (
bool
|None
, default:None
) – IfFalse
, loads latest run of transform (default notebook), ifTrue
, creates new run (default pipeline).path (
str
|None
, default:None
) – Filepath of notebook or script. Only needed if it can’t be automatically detected.
- Return type:
None
Examples
To create a transform
uid
for tracking a script or notebook, call:>>> ln.track()
To track the run of a notebook or script, call:
>>> ln.track("FPnfDtJz8qbE0000") # replace with your uid