Files
energy-trade/backend/app/ml/utils/config.py
kbt-devops fe76bc7629 Add FastAPI backend for energy trading system
Implements FastAPI backend with ML model support for energy trading,
including price prediction models and RL-based battery trading policy.
Features dashboard, trading, backtest, and settings API routes with
WebSocket support for real-time updates.
2026-02-12 00:59:26 +07:00

17 lines
371 B
Python

from dataclasses import dataclass
from typing import List, Dict, Any
@dataclass
class MLConfig:
enable_gpu: bool = False
n_jobs: int = 4
verbose: bool = True
@classmethod
def from_dict(cls, config_dict: Dict[str, Any]) -> "MLConfig":
return cls(**{k: v for k, v in config_dict.items() if k in cls.__annotations__})
__all__ = ["MLConfig"]