lamindb.track¶
- lamindb.track(transform=None, *, project=None, space=None, params=None, new_run=None, path=None)¶
Track a global run in your compute session.
sets
transform
&run
by creating or loadingTransform
&Run
recordswrites compute environment to prepare populating:
run.environment
if
sync_git_repo
is set, checks whether a script-like transform exists in a git repository and links it
Guide: Track notebooks, scripts & functions
- Parameters:
transform (
str
|Transform
|None
, default:None
) – A transformuid
or record. IfNone
, manages thetransform
based on the script or notebook that callsln.track()
.project (
str
|None
, default:None
) – A projectname
oruid
for labeling entities created during the run.space (
str
|None
, default:None
) – A spacename
oruid
for creating entities during the run. This doesn’t affect bionty entities given they should typically be commonly accessible.params (
dict
|None
, default:None
) – A dictionary of parameters to track for the run.new_run (
bool
|None
, default:None
) – IfFalse
, loads the latest run of transform (default notebook), ifTrue
, creates new run (default non-notebook).path (
str
|None
, default:None
) – Filepath of notebook or script. Only needed if it can’t be automatically detected.
- Return type:
None
Examples
To track the run of a notebook or script, call:
ln.track()
If you want to ensure a single version history across renames of the notebook or script, pass the auto-generated
uid
that you’ll find in the logs:ln.track("Onv04I53OgtT0000") # example uid, the last four characters encode the version of the transform