lamindb.dev.Settings#

class lamindb.dev.Settings#

Bases: object

Settings.

Directly use instance lamindb.settings rather than instantiating this class yourself.

Attributes

file_use_virtual_keys bool#

The key parameter in File is treated as a virtual storage key.

If True, the key is not used to construct file paths.

silence_file_run_transform_warning bool#

Silence warning about missing run & transform during file creation.

storage property#

Default storage location (a path to its root).

Examples:

You can set the root via:

>>> 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
track_run_inputs bool#

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

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

FAQ: Can I disable tracking run inputs?

upon_create_search_names bool#

To speed up creating Registry objects (default True).

If True, search for alternative names.

FAQ: What happens if I save the same files & records twice?

upon_file_create_if_hash_exists str#

Behavior if file hash exists (default "warn_return_existing").

One of ["warn_return_existing", "error", "warn_create_new"].

FAQ: What happens if I save the same files & records twice?

upon_file_create_skip_size_hash bool#

To speed up registering high numbers of files (default False).

This bypasses queries for size and hash to AWS & GCP.

It speeds up file creation by about a factor 100.

verbosity property#

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

This is based on Scanpy’s and Django’s verbosity setting.