-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmllm_types.py
53 lines (39 loc) · 1.13 KB
/
mllm_types.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
50
51
52
53
from pydantic import BaseModel, Json
from pathlib import Path
import argparse, datetime
import yaml, logging, reactivedb
from typing import Any
class EnvConfig(BaseModel):
additional_readonly_locations: list[str]
build_script: str
state_root: Path
system_prompt: str
class GenerationEnv(reactivedb.Model):
config: EnvConfig
task_id: str
generation_set_id: str
base_revision: str
mount_path: Path
task_prompt: str
files: list[str]
created: float
changed_files: frozenset[str] = frozenset()
build_successful: bool | None = None
build_output: str | None = None
difficulty: str | None = None
@property
def base_root_path(self):
return self.config.state_root / self.base_revision
class GenerationOutput(reactivedb.Model):
task_id: str
generation_set_id: str
rebased_from_generation_output: int | None
created: float
messages: Any
meta: Any
base_revision: str
tip_revision: str
changed_files: list[str]
build_successful: bool | None = None
build_output: str | None = None
applied: bool | None = False