Configuration Objects¶
DELM keeps runtime settings in dataclasses with strict validation. Review each configuration type below to understand default values, validation rules, and serialization behaviour.
delm.config.LLMExtractionConfig
dataclass
¶
Bases: BaseConfig
Configuration for the LLM extraction process.
delm.config.SplittingConfig
dataclass
¶
Bases: BaseConfig
Configuration for text splitting strategy.
from_dict
classmethod
¶
from_dict(data: Dict[str, Any]) -> SplittingConfig
Construct a SplittingConfig
from a mapping.
Parameters: |
|
---|
Returns: |
|
---|
to_dict ¶
to_dict() -> dict
Serialize the strategy configuration to a dictionary.
Returns: |
|
---|
validate ¶
validate()
Validate the configured split strategy.
Raises: |
|
---|
delm.config.ScoringConfig
dataclass
¶
Bases: BaseConfig
Configuration for relevance scoring strategy.
from_dict
classmethod
¶
from_dict(data: Dict[str, Any]) -> ScoringConfig
Construct a ScoringConfig
from a mapping.
Parameters: |
|
---|
Returns: |
|
---|
validate ¶
validate()
Validate the configured scorer.
Raises: |
|
---|
delm.config.DataPreprocessingConfig
dataclass
¶
Bases: BaseConfig
Configuration for the data preprocessing pipeline.
from_dict
classmethod
¶
from_dict(data: Dict[str, Any]) -> DataPreprocessingConfig
Construct a DataPreprocessingConfig
from a mapping.
Tracks which fields were explicitly set to detect conflicts when
preprocessed_data_path
is used.
Parameters: |
|
---|
Returns: |
|
---|
to_dict ¶
to_dict() -> dict
Serialize preprocessing configuration.
Returns: |
|
---|
validate ¶
validate()
Validate the preprocessing configuration.
Raises: |
|
---|
delm.config.SchemaConfig
dataclass
¶
Bases: BaseConfig
Configuration for extraction schema reference and settings.
This config contains: - Path to the schema specification file (schema_spec.yaml) - Schema‑specific settings (prompts)
The actual schema definition (including container_name) is stored in the separate schema_spec.yaml file.
delm.config.SemanticCacheConfig
dataclass
¶
Bases: BaseConfig
Persistent semantic‑cache settings.
delm.config.DELMConfig
dataclass
¶
Bases: BaseConfig
Complete DELM configuration including pipeline and schema reference.
Contains: - Pipeline configuration (LLM settings, data preprocessing, etc.) - Reference to a separate schema specification file
The configuration can be loaded from: - A single pipeline config file (config.yaml) that references a schema file - Separate pipeline config and schema spec files
from_any
staticmethod
¶
from_any(
config_like: DELMConfig | dict[str, Any] | str | Path,
) -> DELMConfig
Create DELMConfig
from various input types.
Parameters: |
|
---|
Returns: |
|
---|
Raises: |
|
---|
from_dict
classmethod
¶
from_dict(data: Dict[str, Any]) -> DELMConfig
Create DELMConfig
from a mapping.
from_yaml
classmethod
¶
from_yaml(path: Path) -> DELMConfig
Create DELMConfig
from a pipeline config YAML file.
Parameters: |
|
---|
Returns: |
|
---|
Raises: |
|
---|
to_serialized_config_dict ¶
to_serialized_config_dict() -> dict
Return a dictionary suitable for saving as pipeline config YAML.
to_serialized_schema_spec_dict ¶
to_serialized_schema_spec_dict() -> dict
Load and return the schema spec as a dictionary (schema_spec.yaml).