forked from pesc101/exp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
49 lines (37 loc) · 811 Bytes
/
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
47
48
49
from dataclasses import dataclass
@dataclass
class Model:
model_name: str
model_name_short: str
gpu_memory_utilization: float
temperature: float
max_tokens: int
top_p: float = 0.95
seed: int | None = None
@dataclass
class Dataset:
dataset_path: str
dataset_name: str
split: str
max_samples: int
@dataclass
class MLFlowConfig:
"""MLFlow configuration."""
experiment_id: str
uri: str
@dataclass
class VectorDB:
"""VectorDB configuration."""
collection_name: str
top_k: int
@dataclass
class Config:
debug: bool
model: Model
dataset: Dataset
mlflow: MLFlowConfig
vector_db: VectorDB
sys_prompt_path: str
tools_file_path: str
output_file_path: str
template_name: str = "generate_python_code_conv.j2"