blob: 7f6b6feba233d29d1c9c9b392570af493612848e (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
from dataclasses import dataclass, field
from typing import Callable
@dataclass(frozen=True)
class BenchmarkSpec:
name: str
tier: str
domain: str
task_type: str
metric: str
priority: int
status: str = "planned"
notes: str = ""
@dataclass(frozen=True)
class ViewSpec:
name: str
family: str
graph_type: str
priority: int
status: str = "planned"
notes: str = ""
@dataclass(frozen=True)
class ComputeSpec:
name: str
family: str
priority: int
status: str = "planned"
notes: str = ""
@dataclass(frozen=True)
class ModifierSpec:
name: str
family: str
priority: int
status: str = "planned"
notes: str = ""
@dataclass(frozen=True)
class RunSpec:
task: str
view: str
compute: str
modifier: str = "none"
default_args: dict[str, object] = field(default_factory=dict)
command_builder: Callable[[dict[str, object]], list[str]] | None = None
def by_name(items):
return {item.name: item for item in items}
|