Skip to content

Commit 3ae6bfe

Browse files
committed
chore: wrongly removed code
1 parent ed9c147 commit 3ae6bfe

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

py/src/braintrust/db_fields.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
TRANSACTION_ID_FIELD = "_xact_id"
22
OBJECT_DELETE_FIELD = "_object_delete"
3+
CREATED_FIELD = "created"
4+
ID_FIELD = "id"
35

46
IS_MERGE_FIELD = "_is_merge"
7+
MERGE_PATHS_FIELD = "_merge_paths"
8+
ARRAY_DELETE_FIELD = "_array_delete"
59

610
AUDIT_SOURCE_FIELD = "_audit_source"
711
AUDIT_METADATA_FIELD = "_audit_metadata"
812
VALID_SOURCES = ["app", "api", "external"]
913

14+
PARENT_ID_FIELD = "_parent_id"
15+
16+
ASYNC_SCORING_CONTROL_FIELD = "_async_scoring_control"
17+
SKIP_ASYNC_SCORING_FIELD = "_skip_async_scoring"
18+
1019
# Keys that identify which object (experiment, dataset, project logs, etc.) a row belongs to.
1120
OBJECT_ID_KEYS = (
1221
"experiment_id",

py/src/braintrust/framework.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ class bcolors:
6969
WARNING = "\033[93m"
7070
FAIL = "\033[91m"
7171
ENDC = "\033[0m"
72-
73-
74-
# BOLD = "\033[1m"
75-
# UNDERLINE = "\033[4m"
72+
# BOLD = "\033[1m"
73+
# UNDERLINE = "\033[4m"
7674

7775

7876
@dataclasses.dataclass
@@ -230,6 +228,17 @@ def parameters(self) -> ValidatedParameters | None:
230228
"""
231229

232230

231+
class EvalScorerArgs(SerializableDataClass, Generic[Input, Output]):
232+
"""
233+
Arguments passed to an evaluator scorer. This includes the input, expected output, actual output, and metadata.
234+
"""
235+
236+
input: Input
237+
output: Output
238+
expected: Output | None = None
239+
metadata: Metadata | None = None
240+
241+
233242
OneOrMoreScores = Union[float, int, bool, None, Score, list[Score]]
234243

235244

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ addopts = "--durations=3 --durations-min=0.1"
2323

2424
[tool.vulture]
2525
paths = ["py/src"]
26-
ignore_names = ["with_simulate_login", "reset_id_generator_state", "dataset_record_id"] # pytest fixtures and deprecated-but-public API parameters
26+
ignore_names = ["with_simulate_login", "reset_id_generator_state", "dataset_record_id", "EvalScorerArgs", "CREATED_FIELD", "ID_FIELD", "MERGE_PATHS_FIELD", "ARRAY_DELETE_FIELD", "PARENT_ID_FIELD", "ASYNC_SCORING_CONTROL_FIELD", "SKIP_ASYNC_SCORING_FIELD"] # pytest fixtures, deprecated-but-public API, and protocol field constants
2727
min_confidence = 100

0 commit comments

Comments
 (0)