Can I disable tracking run inputs? .md .md

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
Hide code cell output
 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()
Hide code cell output
 created Transform('Iox3M9QB43EM0000', key='Dummpy pipeline'), started new Run('ewVoVaPtYGJgWvA3') at 2026-06-22 07:43:35 UTC
! data is a DataFrame, please use .from_dataframe()
Artifact(uid='x6dxKri1CyVW5M020000', key=None, description='My csv', suffix='.csv', kind=None, otype='DataFrame', size=11, hash='z1LdF2qN4cN0M2sXrcW8aw', n_files=None, n_observations=None, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=1, run_id=1, schema_id=None, created_by_id=1, created_at=2026-06-22 07:43:37 UTC, is_locked=False, version_tag=None, is_latest=True)

Call ln.track():

ln.track("Rx2s9aPTMQLY0000")
Hide code cell output
 created Transform('Rx2s9aPTMQLY0000', key='track-run-inputs.ipynb'), started new Run('QlMbqiWFIgnD6yDY') at 2026-06-22 07:43:37 UTC
 notebook imports: lamindb

Don’t track artifact as run input

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

No run inputs are linked to the current notebook run:

ln.Run.get(id=ln.context.run.id).input_artifacts.all()
Hide code cell output
<ArtifactBasicQuerySet []>
artifact.view_lineage()
Hide code cell output
../_images/2cf614ecd3e869ae636546729cf02cc2b00dc7f1ab776fd8900b7b2eca4a2a04.svg
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)
Hide code cell output
PosixUPath('/home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb/l3a6nEaPfwWiVICc0000.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)
Hide code cell output
Artifact(uid='l3a6nEaPfwWiVICc0000', key=None, description='My image', suffix='.jpg', kind=None, otype=None, size=29358, hash='r4tnqmKI_SjrkdLzpuWp4g', n_files=None, n_observations=None, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=1, run_id=1, schema_id=None, created_by_id=1, created_at=2026-06-22 07:43:37 UTC, is_locked=False, version_tag=None, is_latest=True)
artifact.view_lineage()
Hide code cell output
../_images/4f5d358addba1d5f049c122a910938b38c4ae04b322d542de12cf136df5c4f14.svg
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()
Hide code cell output
test
0 1
1 2
2 3
for input in ln.Run.get(id=ln.context.run.id).input_artifacts.all():
    print(input)
Hide code cell output
Artifact(uid='l3a6nEaPfwWiVICc0000', key=None, description='My image', suffix='.jpg', kind=None, otype=None, size=29358, hash='r4tnqmKI_SjrkdLzpuWp4g', n_files=None, n_observations=None, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=1, run_id=1, schema_id=None, created_by_id=1, created_at=2026-06-22 07:43:37 UTC, is_locked=False, version_tag=None, is_latest=True)
Artifact(uid='x6dxKri1CyVW5M020000', key=None, description='My csv', suffix='.csv', kind=None, otype='DataFrame', size=11, hash='z1LdF2qN4cN0M2sXrcW8aw', n_files=None, n_observations=None, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=1, run_id=1, schema_id=None, created_by_id=1, created_at=2026-06-22 07:43:37 UTC, is_locked=False, version_tag=None, is_latest=True)
artifact.view_lineage()
Hide code cell output
../_images/4465a798b0cc04e8006e95d682a394019346943c244157e3e9e64e33438af121.svg
assert len(ln.Run.get(id=ln.context.run.id).input_artifacts.all()) == 2
!lamin delete --force test-run-inputs
Hide code cell output
╭─ Error ──────────────────────────────────────────────────────────────────────╮
 '/home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb'        
 contains 2 objects:                                                          
 /home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb/l3a6nEaP 
 fwWiVICc0000.jpg                                                             
 /home/runner/work/lamindb/lamindb/docs/faq/test-run-inputs/.lamindb/x6dxKri1 
 CyVW5M020000.csv                                                             
 delete them prior to deleting the storage location                           
╰──────────────────────────────────────────────────────────────────────────────╯