from __future__ import annotations from dataclasses import asdict, dataclass from typing import Any @dataclass class RouterModelConfig: encoder_name: str dropout: float action_vocab: list[str] outcome_vocab: list[str] label_maps: dict[str, list[str]] structured_hidden_dim: int = 32 recency_embed_dim: int = 8 pooling_type: str = "mean" use_head_dependencies: bool = False dependency_hidden_dim: int = 32 feature_mode: str = "full_interaction" max_length: int = 256 recency_max: int = 3600 def to_dict(self) -> dict[str, Any]: return asdict(self) @classmethod def from_dict(cls, data: dict[str, Any]) -> "RouterModelConfig": return cls(**data)