Skip to content

Configs

dnallm.configuration.configs

Classes

BenchmarkConfig

Bases: BaseModel

Top-level configuration for the DNA Language Model benchmark. This class validates and structures the entire YAML configuration file, where each top-level key in the YAML corresponds to an attribute of this class.

BenchmarkInfoConfig

Bases: BaseModel

Configuration for the benchmark's metadata.

CallbackConfig

Bases: BaseModel

Configuration for training callbacks.

Only predefined callbacks are supported in Phase 2. Custom callbacks are deferred to v2.

DatasetConfig

Bases: BaseModel

Configuration for a single dataset used in the benchmark.

EarlyStoppingConfig

Bases: BaseModel

Configuration for early stopping callback.

EvaluationConfig

Bases: BaseModel

Configuration for the evaluation phase of the benchmark.

HeadConfig

Bases: BaseModel

Configuration for the classification/regression head

HyperparameterSearchConfig

Bases: BaseModel

Configuration for Optuna hyperparameter search.

InferenceConfig

Bases: BaseModel

Configuration for model inference

LoraConfig

Bases: BaseModel

Configuration for LoRA (Low-Rank Adaptation).

Compatible with both standard LoRA and QLoRA (4-bit quantization). When use_qlora=True, the base model is loaded in 4-bit and LoRA adapters are applied via prepare_model_for_kbit_training().

ModelConfig

Bases: BaseModel

Configuration for a single model to be benchmarked.

OutputConfig

Bases: BaseModel

Configuration for generating benchmark reports and artifacts.

SearchSpaceDistribution

Bases: BaseModel

A single hyperparameter distribution for Optuna search.

Supports both explicit type declaration and concise HF-like format.

TaskConfig

Bases: BaseModel

Configuration for different fine-tuning tasks

TrainingConfig

Bases: BaseModel

Configuration for training

Functions:

load_config

load_config(config_path)

Load configuration from a YAML file and return a dictionary of configuration objects. Args: config_path (str): Path to the YAML configuration file.