File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
src/labelbox/schema/tool_building Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class IncorrectStepReasoningVariant:
19
19
id : int
20
20
name : str
21
21
regenerate_conversations_after_incorrect_step : Optional [bool ] = True
22
- rate_alternative_responses : Optional [bool ] = False
22
+ rate_alternative_responses : Optional [bool ] = True
23
23
24
24
def asdict (self ) -> Dict [str , Any ]:
25
25
actions = []
@@ -169,12 +169,12 @@ def reset_regenerate_conversations_after_incorrect_step(self):
169
169
"""
170
170
self .definition .variants .incorrect_step .regenerate_conversations_after_incorrect_step = False
171
171
172
- def set_rate_alternative_responses (self ):
172
+ def reset_rate_alternative_responses (self ):
173
173
"""
174
174
For live models, will require labelers to rate the alternatives generated by the model
175
175
"""
176
176
self .definition .variants .incorrect_step .rate_alternative_responses = (
177
- True
177
+ False
178
178
)
179
179
180
180
def asdict (self ) -> Dict [str , Any ]:
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
339
339
{
340
340
"id" : 2 ,
341
341
"name" : "Incorrect" ,
342
- "actions" : ["regenerateSteps" ],
342
+ "actions" : ["regenerateSteps" , "generateAndRateAlternativeSteps" ],
343
343
},
344
344
]
345
345
assert step_reasoning_tool ["definition" ]["version" ] == 1
@@ -364,6 +364,6 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
364
364
{
365
365
"id" : 2 ,
366
366
"name" : "Incorrect" ,
367
- "actions" : ["regenerateSteps" ],
367
+ "actions" : ["regenerateSteps" , "generateAndRateAlternativeSteps" ],
368
368
},
369
369
]
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ def test_step_reasoning_as_dict_default():
16
16
{
17
17
"id" : 2 ,
18
18
"name" : "Incorrect" ,
19
- "actions" : ["regenerateSteps" ],
19
+ "actions" : [
20
+ "regenerateSteps" ,
21
+ "generateAndRateAlternativeSteps" ,
22
+ ],
20
23
},
21
24
],
22
25
"version" : 1 ,
@@ -26,7 +29,7 @@ def test_step_reasoning_as_dict_default():
26
29
27
30
def test_step_reasoning_as_dict_with_actions ():
28
31
tool = StepReasoningTool (name = "step reasoning" )
29
- tool .set_rate_alternative_responses ()
32
+ tool .reset_rate_alternative_responses ()
30
33
tool .reset_regenerate_conversations_after_incorrect_step ()
31
34
assert tool .asdict () == {
32
35
"tool" : "step-reasoning" ,
@@ -41,9 +44,7 @@ def test_step_reasoning_as_dict_with_actions():
41
44
{
42
45
"id" : 2 ,
43
46
"name" : "Incorrect" ,
44
- "actions" : [
45
- "generateAndRateAlternativeSteps" ,
46
- ],
47
+ "actions" : [],
47
48
},
48
49
],
49
50
"version" : 1 ,
You can’t perform that action at this time.
0 commit comments