"""Data processing utilities for EmberGraphRouter.

Data generation utilities (LLMEngine, TASK_SPECS, data_building) are loaded lazily
to avoid pulling in heavy dependencies (ember, etc.) during training.
"""

# Lightweight utilities always available
from .utils import loadjson, loadpkl

__all__ = [
    "LLMEngine",
    "TASK_SPECS",
    "data_building",
    "loadjson",
    "loadpkl",
]


def __getattr__(name: str):
    """Lazy load data generation utilities to avoid heavy imports during training."""
    if name == "data_building":
        from .construct_router_data import data_building
        return data_building
    if name == "LLMEngine":
        from .llm_engine import LLMEngine
        return LLMEngine
    if name == "TASK_SPECS":
        from .multidata_unify import TASK_SPECS
        return TASK_SPECS
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
