File size: 496 Bytes
aa677e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple


@dataclass
class Action:
    variant: str
    fidelity: str
    knobs: Dict[str, Any]


class Agent:
    def propose(self) -> Action:
        raise NotImplementedError

    def observe(
        self,
        action: Action,
        ok: bool,
        reward: Optional[float],
        metrics_flat: Optional[Dict[str, Any]],
    ) -> None:
        raise NotImplementedError