Can I disable tracking run inputs?

Yes, if you switch track_run_inputs to False.

# pip install lamindb
!lamin init --storage test-run-inputs
Hide code cell output
 initialized lamindb: testuser1/test-run-inputs
import lamindb as ln
 connected lamindb: testuser1/test-run-inputs

Some test artifacts:

ln.track(transform=ln.Transform(key="Dummpy pipeline"))
ln.Artifact(ln.examples.datasets.file_jpg_paradisi05(), description="My image").save()
ln.Artifact(ln.examples.datasets.file_mini_csv(), description="My csv").save()
 created Transform('281t3uOlxdLQ0000', key='Dummpy pipeline'), started new Run('C4DX0KUQCSsvbYd1') at 2025-10-27 08:32:04 UTC
 recommendation: to identify the script across renames, pass the uid: ln.track("281t3uOlxdLQ")
Artifact(uid='g1TKfSipuCwbOa5v0000', version=None, is_latest=True, key=None, description='My csv', suffix='.csv', kind=None, otype=None, size=11, hash='z1LdF2qN4cN0M2sXrcW8aw', n_files=None, n_observations=None, branch_id=1, space_id=1, storage_id=1, run_id=1, schema_id=None, created_by_id=1, created_at=2025-10-27 08:32:05 UTC, is_locked=False)

Call ln.track():

ln.track("Rx2s9aPTMQLY0000")

Don’t track artifact as run input

ln.settings.track_run_inputs = False
artifact = ln.Artifact.get(description="My image")
artifact.cache()
PosixUPath('/home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb/AGHdxCrt6W0DjFKK0000.jpg')

No run inputs are linked to the current notebook run:

ln.Run.get(id=ln.context.run.id).input_artifacts.all()
<ArtifactBasicQuerySet []>
artifact.view_lineage()
../_images/8df492ee789062dd1568dfafdaf3d7557a374bfb20c42600e9c92a7c9429e4f3.svg
Hide code cell content
assert len(ln.Run.get(id=ln.context.run.id).input_artifacts.all()) == 0

Manually track artifact as run input

Let us manually track an artifact by passing is_run_input to either .cache(), .load() or .open():

artifact.cache(is_run_input=True)
PosixUPath('/home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb/AGHdxCrt6W0DjFKK0000.jpg')

You can see the fcs artifact is now being added to the run inputs:

for input in ln.Run.get(id=ln.context.run.id).input_artifacts.all():
    print(input)
artifact.view_lineage()
../_images/35bdea1eb0195703bda7a3088b34c8bd73e8364f9df94dd50f9bb34443301786.svg
Hide code cell content
assert len(ln.Run.get(id=ln.context.run.id).input_artifacts.all()) == 1

Automatically track artifacts as run input

If you switch the following setting, and call to .load(), .cache() and .open() will track the artifact as run input.

ln.settings.track_run_inputs = True
artifact = ln.Artifact.get(description="My csv")
artifact.load()
test
0 1
1 2
2 3
for input in ln.Run.get(id=ln.context.run.id).input_artifacts.all():
    print(input)
artifact.view_lineage()
../_images/668aa77bacb871f11100897a28fcd73d460d34c50c452e073a92f97c608f8347.svg
Hide code cell content
assert len(ln.Run.get(id=ln.context.run.id).input_artifacts.all()) == 2
Hide code cell content
!lamin delete --force test-run-inputs