Skip to content

Commit 03b2257

Browse files
author
Val Brodsky
committed
Fixed name of a step for step reasoning
1 parent 3a06ec5 commit 03b2257

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class IncorrectStepReasoningVariant:
2121
name: str
2222
regenerate_steps: Optional[bool] = True
2323
generate_and_rate_alternative_steps: Optional[bool] = True
24-
rewrite_steps: Optional[bool] = True
24+
rewrite_step: Optional[bool] = True
2525
justification: Optional[bool] = True
2626

2727
def asdict(self) -> Dict[str, Any]:
@@ -30,8 +30,8 @@ def asdict(self) -> Dict[str, Any]:
3030
actions.append("regenerateSteps")
3131
if self.generate_and_rate_alternative_steps:
3232
actions.append("generateAndRateAlternativeSteps")
33-
if self.rewrite_steps:
34-
actions.append("rewriteSteps")
33+
if self.rewrite_step:
34+
actions.append("rewriteStep")
3535
if self.justification:
3636
actions.append("justification")
3737
return {"id": self.id, "name": self.name, "actions": actions}
@@ -46,7 +46,7 @@ def from_dict(
4646
regenerate_steps="regenerateSteps" in dictionary.get("actions", []),
4747
generate_and_rate_alternative_steps="generateAndRateAlternativeSteps"
4848
in dictionary.get("actions", []),
49-
rewrite_steps="rewriteSteps" in dictionary.get("actions", []),
49+
rewrite_step="rewriteStep" in dictionary.get("actions", []),
5050
justification="justification" in dictionary.get("actions", []),
5151
)
5252

@@ -183,11 +183,11 @@ def reset_generate_and_rate_alternative_steps(self):
183183
"""
184184
self.definition.variants.incorrect_step.generate_and_rate_alternative_steps = False
185185

186-
def reset_rewrite_steps(self):
186+
def reset_rewrite_step(self):
187187
"""
188188
For live models, will require labelers to rewrite the conversation
189189
"""
190-
self.definition.variants.incorrect_step.rewrite_steps = False
190+
self.definition.variants.incorrect_step.rewrite_step = False
191191

192192
def reset_justification(self):
193193
"""

libs/labelbox/tests/unit/test_unit_step_reasoning_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_step_reasoning_as_dict_default():
1919
"actions": [
2020
"regenerateSteps",
2121
"generateAndRateAlternativeSteps",
22-
"rewriteSteps",
22+
"rewriteStep",
2323
"justification",
2424
],
2525
},
@@ -33,7 +33,7 @@ def test_step_reasoning_as_dict_with_actions():
3333
tool = StepReasoningTool(name="step reasoning")
3434
tool.reset_generate_and_rate_alternative_steps()
3535
tool.reset_regenerate_steps()
36-
tool.reset_rewrite_steps()
36+
tool.reset_rewrite_step()
3737
tool.reset_justification()
3838
assert tool.asdict() == {
3939
"tool": "step-reasoning",

0 commit comments

Comments
 (0)