Settings¶
settings
¶
DagliteSettings
dataclass
¶
Configuration settings for daglite.
Source code in src/daglite/settings.py
backend
class-attribute
instance-attribute
¶
Default backend to use for task execution when none is specified.
cache_store
class-attribute
instance-attribute
¶
cache_store: CacheStore | str | None = field(
default_factory=lambda: getenv("DAGLITE_CACHE_STORE") or ".cache"
)
Default cache store for caching tasks (defaults to ".cache").
Can be a CacheStore instance, a string path (which will be used to create a CacheStore
with a FileDriver), or None to disable caching. Can also be set via the DAGLITE_CACHE_STORE
environment variable.
dataset_store
class-attribute
instance-attribute
¶
dataset_store: str | DatasetStore = field(
default_factory=lambda: getenv("DAGLITE_DATASET_STORE") or "."
)
Default dataset store for saving and loading datasets (defaults to current directory).
Can be DatasetStore instance or a string path (which will be used to create a DatasetStore
with a FileDriver). Can also be set via DAGLITE_DATASET_STORE environment variable.
enable_plugin_tracing
class-attribute
instance-attribute
¶
enable_plugin_tracing: bool = field(
default_factory=lambda: _env_get_bool("DAGLITE_TRACE_HOOKS", False)
)
Enable detailed tracing of plugin hook calls.
When enabled, all plugin hook invocations are logged at DEBUG level, showing hook names, arguments, and return values. Useful for debugging plugin behavior but can be verbose.
Can be set via DAGLITE_TRACE_HOOKS environment variable (1/true/yes to enable).
max_backend_threads
class-attribute
instance-attribute
¶
Maximum number of threads to be used by the threading backend.
Defaults to ThreadPoolExecutor's default: min(32, cpu_count + 4).
max_parallel_processes
class-attribute
instance-attribute
¶
Maximum number of parallel processes to be used by the process backend.
Defaults to the number of CPU cores available.
max_timeout_workers
class-attribute
instance-attribute
¶
Maximum number of worker threads for enforcing task timeouts per backend.
Each local backend (Inline, threading, multiprocessing) gets its own dedicated thread pool of this size for timeout enforcement. Increase this value if you have a large number of concurrent tasks with timeouts to avoid delays in timeout enforcement.
get_global_settings
¶
Get the global daglite settings instance (thread-safe).
If no global settings have been set, returns a default instance.
Source code in src/daglite/settings.py
set_global_settings
¶
Set the global daglite settings instance (thread-safe).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
DagliteSettings
|
Settings to set as global. |
required |
Examples:
>>> from daglite.settings import set_global_settings, DagliteSettings
>>> set_global_settings(DagliteSettings(max_backend_threads=16))