-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
46 lines (32 loc) · 1.77 KB
/
config.py
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
from typing import Any, Protocol
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Config:
meta: Any
data: Any
model: Any
trainer: Any
@dataclass
class Meta:
name: str
project: str = "desct"
tags: list[str] = field(default_factory=list)
experiment_folder: str = "experiment"
# ╭──────────────────────────────────────────────────────────╮
# │ Data Configurations │
# ╰──────────────────────────────────────────────────────────╯
# ╭──────────────────────────────────────────────────────────╮
# │ Model Configurations │
# ╰──────────────────────────────────────────────────────────╯
@dataclass
class ModelConfig:
name: str
config: Any
# ╭──────────────────────────────────────────────────────────╮
# │ Trainer configurations │
# ╰──────────────────────────────────────────────────────────╯
@dataclass
class TrainerConfig:
lr: float = 0.001
num_epochs: int = 200
num_reruns: int = 1