Skip to content

Commit a18eb5d

Browse files
author
Val Brodsky
committed
Add some more documentation
1 parent 2fce6e3 commit a18eb5d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

libs/labelbox/src/labelbox/schema/ontology.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ def add_classification(self, classification: Classification) -> None:
494494
self.classifications.append(classification)
495495

496496

497+
"""
498+
The following 2 functions help to bridge the gap between the step reasoning all other tool ontologies.
499+
"""
500+
501+
497502
def tool_cls_from_type(tool_type: str):
498503
tool_cls = map_tool_type_to_tool_cls(tool_type)
499504
if tool_cls is not None:

libs/labelbox/src/labelbox/schema/tool_building/fact_checking_tool.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class NoFactualInformationStepActions(Enum):
2525
@dataclass
2626
class FactCheckingVariants:
2727
"""
28-
This class is used to define the possible options for evaluating a step
29-
Currently the options are correct, neutral, and incorrect
28+
List of possible fact checking variants (options)
29+
Note variant kinds can not be changed
3030
"""
3131

3232
accurate_step: Variant = field(
@@ -115,14 +115,13 @@ def from_dict(cls, dictionary: List[Dict[str, Any]]):
115115
raise ValueError("Missing variant")
116116

117117
return cls(
118-
accurate_step=accurate_step,
119-
inaccurate_step=inaccurate_step,
120-
disputed_step=disputed_step,
121-
unsupported_step=unsupported_step,
122-
cant_confidently_assess_step=cant_confidently_assess_step,
123-
no_factual_information_step=no_factual_information_step,
124-
) # type: ignore
125-
118+
accurate_step=accurate_step, # type: ignore
119+
inaccurate_step=inaccurate_step, # type: ignore
120+
disputed_step=disputed_step, # type: ignore
121+
unsupported_step=unsupported_step, # type: ignore
122+
cant_confidently_assess_step=cant_confidently_assess_step, # type: ignore
123+
no_factual_information_step=no_factual_information_step, # type: ignore
124+
)
126125

127126
@dataclass
128127
class FactCheckingDefinition:
@@ -150,7 +149,7 @@ def from_dict(cls, dictionary: Dict[str, Any]) -> "FactCheckingDefinition":
150149
@dataclass
151150
class FactCheckingTool:
152151
"""
153-
Use this class in OntologyBuilder to create a tool for step fact checking
152+
Use this class in OntologyBuilder to create a tool for fact checking
154153
"""
155154

156155
name: str

0 commit comments

Comments
 (0)