#!/usr/bin/env python3
# Source: t6-practitioner-toolkit.html
# config/ranker_v7.yaml  (read by the training script, logged with the run)
# data:
#   train_table: events.ranker_train
#   snapshot: 2026-09-30
#   label: long_click_30s
# model:
#   type: gbdt
#   num_trees: 800
#   learning_rate: 0.05
# eval:
#   slices: [country, device, new_user]
# seed: 13

from dataclasses import dataclass
import yaml

@dataclass(frozen=True)
class Config:
    data: dict
    model: dict
    eval: dict
    seed: int

def load_config(path: str) -> Config:
    with open(path) as f:
        return Config(**yaml.safe_load(f))
