Skip to content

Commit 1279c28

Browse files
author
Val Brodsky
committed
Make all default actions True
1 parent cbc6d95 commit 1279c28

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class IncorrectStepReasoningVariant:
1919
id: int
2020
name: str
2121
regenerate_conversations_after_incorrect_step: Optional[bool] = True
22-
rate_alternative_responses: Optional[bool] = False
22+
rate_alternative_responses: Optional[bool] = True
2323

2424
def asdict(self) -> Dict[str, Any]:
2525
actions = []
@@ -169,12 +169,12 @@ def reset_regenerate_conversations_after_incorrect_step(self):
169169
"""
170170
self.definition.variants.incorrect_step.regenerate_conversations_after_incorrect_step = False
171171

172-
def set_rate_alternative_responses(self):
172+
def reset_rate_alternative_responses(self):
173173
"""
174174
For live models, will require labelers to rate the alternatives generated by the model
175175
"""
176176
self.definition.variants.incorrect_step.rate_alternative_responses = (
177-
True
177+
False
178178
)
179179

180180
def asdict(self) -> Dict[str, Any]:

libs/labelbox/tests/integration/test_ontology.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
339339
{
340340
"id": 2,
341341
"name": "Incorrect",
342-
"actions": ["regenerateSteps"],
342+
"actions": ["regenerateSteps", "generateAndRateAlternativeSteps"],
343343
},
344344
]
345345
assert step_reasoning_tool["definition"]["version"] == 1
@@ -364,6 +364,6 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
364364
{
365365
"id": 2,
366366
"name": "Incorrect",
367-
"actions": ["regenerateSteps"],
367+
"actions": ["regenerateSteps", "generateAndRateAlternativeSteps"],
368368
},
369369
]

libs/labelbox/tests/unit/test_unit_step_reasoning_tool.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ def test_step_reasoning_as_dict_default():
1616
{
1717
"id": 2,
1818
"name": "Incorrect",
19-
"actions": ["regenerateSteps"],
19+
"actions": [
20+
"regenerateSteps",
21+
"generateAndRateAlternativeSteps",
22+
],
2023
},
2124
],
2225
"version": 1,
@@ -26,7 +29,7 @@ def test_step_reasoning_as_dict_default():
2629

2730
def test_step_reasoning_as_dict_with_actions():
2831
tool = StepReasoningTool(name="step reasoning")
29-
tool.set_rate_alternative_responses()
32+
tool.reset_rate_alternative_responses()
3033
tool.reset_regenerate_conversations_after_incorrect_step()
3134
assert tool.asdict() == {
3235
"tool": "step-reasoning",
@@ -41,9 +44,7 @@ def test_step_reasoning_as_dict_with_actions():
4144
{
4245
"id": 2,
4346
"name": "Incorrect",
44-
"actions": [
45-
"generateAndRateAlternativeSteps",
46-
],
47+
"actions": [],
4748
},
4849
],
4950
"version": 1,

0 commit comments

Comments
 (0)