You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Data schema objects
* pipeline runners use data schema for input
* Prompt runner outputs each sut response in different row
* annotation data schema
* New dataset objects
* Use PromptDataset as input to PromptRunner. Delete CsvPromptInput
* Use PromptResponseDataset instead of CSVPromptOutput in prompt runner
* Quote all + only accept csv files in datasets
* Replace annotator input objects with PromptResponseDataset
* New AnnotatedSUTInteraction object.
* Annotation column is a json dict + annotation dataset tests
* Annotation dataset dumps annotations as json strings and reads them back as dictionaries
* Use AnnotationDataset object in annotation runner
* mypy
* remove prints
"""Exception raised when schema validation fails."""
12
+
13
+
def__init__(self, missing_columns):
14
+
"""missing_columns: a list where each element is a string or a list of strings. List elements are used to indicate that the column can be one of several options."""
15
+
self.missing_columns=missing_columns
16
+
super().__init__(str(self))
17
+
18
+
def__str__(self):
19
+
message="Missing required columns:"
20
+
forcolumninself.missing_columns:
21
+
ifisinstance(column, str):
22
+
message+=f"\n\t{column}"
23
+
eliflen(column) ==1:
24
+
message+=f"\n\t{column[0]}"
25
+
else:
26
+
message+=f"\n\tone of: {column}"
27
+
returnmessage
28
+
29
+
30
+
classPromptSchema:
31
+
"""A case-insensitive schema for a prompts file that is used as input to get SUT responses.
0 commit comments