lamindb.core.Settings

class lamindb.core.Settings(git_repo)

Bases: object

Settings.

Use lamindb.settings instead of instantiating this class yourself.

Attributes

property creation: CreationSettings

Record creation settings.

For example, ln.settings.creation.search_names = False will disable searching for records with similar names during creation.

property storage: StorageSettings

Default storage location.

Examples:

>>> ln.settings.storage
StorageSettings(root='s3://my-bucket', uid='j7MaPxtLxPeE')
>>> ln.settings.storage.root
UPath('s3://my-bucket')

You can switch the default storage location to another managed storage location by passing a string:

>>> ln.settings.storage = "s3://some-bucket"

You can also pass additional fsspec kwargs via:

>>> kwargs = dict(
>>>     profile="some_profile", # fsspec arg
>>>     cache_regions=True # fsspec arg for s3
>>> )
>>> ln.settings.storage = "s3://some-bucket", kwargs
property storage_local: StorageSettings

An additional local default storage (a path to its root).

Is only available if keep_artifacts_local is enabled.

Guide: Keep artifacts local in a cloud instance

property sync_git_repo: str | None

Sync transforms with scripts in git repository.

Provide the full git repo URL.

track_run_inputs: bool = True

Track files as input upon .load(), .cache() and .backed().

Requires a global run context with track() was created!

FAQ: Can I disable tracking run inputs?

property transform: TransformSettings

Transform settings.

For example:

ln.settings.transform.stem_uid = "FPnfDtJz8qbE"  # defines version family
ln.settings.transform.version = "1"              # defines version
ln.settings.transform.name = "My good script"    # semantic name

The first two are typically auto-generated by track().

property verbosity: str

Logger verbosity (default 'warning').

  • 'error': ❌ only show error messages

  • 'warning': ❗ also show warning messages

  • 'success': ✅ also show success and save messages

  • 'info': 💡 also show info messages

  • 'hint': 💡 also show hint messages

  • 'debug': 🐛 also show detailed debug messages

Methods