Skip to content

Commit b13d4c1

Browse files
author
Val Brodsky
committed
Add readdoc for the StepReasoningTool
1 parent b286f16 commit b13d4c1

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

docs/labelbox/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Labelbox Python SDK Documentation
4646
search-filters
4747
send-to-annotate-params
4848
slice
49+
step_reasoning_tool
4950
task
5051
task-queue
5152
user

docs/labelbox/step_reasoning_tool.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Step Reasoning Tool
2+
===============================================================================================
3+
4+
.. automodule:: labelbox.schema.tool_building.step_reasoning_tool
5+
:members:
6+
:show-inheritance:

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ def _create_incorrect_step() -> IncorrectStepReasoningVariant:
6262

6363
@dataclass
6464
class StepReasoningVariants:
65+
"""
66+
This class is used to define the possible options for evaluating a step
67+
Currently the options are correct, neutral, and incorrect
68+
"""
69+
6570
CORRECT_STEP_ID = 0
6671
NEUTRAL_STEP_ID = 1
6772
INCORRECT_STEP_ID = 2
@@ -136,6 +141,11 @@ def from_dict(cls, dictionary: Dict[str, Any]) -> "StepReasoningDefinition":
136141

137142
@dataclass
138143
class StepReasoningTool:
144+
"""
145+
Use this class in OntologyBuilder to create a tool for step reasoning
146+
The definition field lists the possible options to evaulate a step
147+
"""
148+
139149
name: str
140150
type: ToolType = field(default=ToolType.STEP_REASONING, init=False)
141151
required: bool = False
@@ -147,9 +157,15 @@ class StepReasoningTool:
147157
)
148158

149159
def set_regenerate_conversations_after_incorrect_step(self):
160+
"""
161+
For live models, will invoke the model to generate alternatives if a step is marked as incorrect
162+
"""
150163
self.definition.variants.incorrect_step.regenerate_conversations_after_incorrect_step = True
151164

152165
def set_rate_alternative_responses(self):
166+
"""
167+
For live models, will require labelers to rate the alternatives generated by the model
168+
"""
153169
self.definition.variants.incorrect_step.rate_alternative_responses = (
154170
True
155171
)

0 commit comments

Comments
 (0)