lamindb.core.Settings

class lamindb.core.Settings

Bases: object

Settings.

Please use the global ln.settings object instead of instantiating this class yourself.

Attributes

property annotation: AnnotationSettings

Artifact annotation settings.

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

property cache_dir: UPath

Cache root, a local directory to cache cloud files.

property creation: CreationSettings

SQLRecord creation settings.

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

property instance_uid: str

The uid of the current instance.

property storage: StorageSettings

Current default storage location for writes.

Examples:

Retrieve the storage settings:

ln.settings.storage
#> StorageSettings(root='s3://my-bucket')

Retrieve the storage root:

ln.settings.storage.root
#> UPath('s3://my-bucket')

You can write artifacts to other storage locations by switching the current default storage location:

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 run inputs (default True).

If this setting is true, an artifact is recorded as run input upon .load(), .cache() & .open() provided track() was called in the current compute (Python, R) session. If track() was not called, you receive a warning message upon .load(), .cache() & .open().

If you switch this setting to False, you won’t see the warning message anymore and no run inputs will be recorded.

FAQ: Can I disable tracking run inputs?

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