lamindb.core.Settings¶
- class lamindb.core.Settings¶
Bases:
objectSettings.
Please use the global
ln.settingsobject instead of instantiating this class yourself.Attributes¶
- property annotation: AnnotationSettings¶
Artifact annotation settings.
For example,
ln.settings.creation.search_names = Falsewill disable searching for records with similar names during creation.
- property creation: CreationSettings¶
SQLRecord creation settings.
For example,
ln.settings.creation.search_names = Falsewill disable searching for records with similar names during creation.
- property instance_uid: str¶
The
uidof the current instance.
- property local_storage: StorageSettings¶
An additional local default storage (a path to its root).
Is only available if
keep_artifacts_localis enabled.
- 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 sync_git_repo: str | None¶
Sync transforms with scripts in git repository.
If set, scripts will be synced with the specified git repository.
Example:
ln.settings.sync_git_repo = https://github.com/laminlabs/schmidt22
You can also pass the git repo URL via the environment variable
LAMINDB_SYNC_GIT_REPO:export LAMINDB_SYNC_GIT_REPO=https://github.com/laminlabs/schmidt22
You’ll then see:
ln.settings.sync_git_repo #> 'https://github.com/laminlabs/schmidt22'
-
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()providedtrack()was called in the current compute (Python, R) session. Iftrack()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.
- 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