Skip to content

[PLT-1779] Make all default actions True #1882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class IncorrectStepReasoningVariant:
id: int
name: str
regenerate_conversations_after_incorrect_step: Optional[bool] = True
rate_alternative_responses: Optional[bool] = False
rate_alternative_responses: Optional[bool] = True

def asdict(self) -> Dict[str, Any]:
actions = []
Expand Down Expand Up @@ -169,12 +169,12 @@ def reset_regenerate_conversations_after_incorrect_step(self):
"""
self.definition.variants.incorrect_step.regenerate_conversations_after_incorrect_step = False

def set_rate_alternative_responses(self):
def reset_rate_alternative_responses(self):
"""
For live models, will require labelers to rate the alternatives generated by the model
"""
self.definition.variants.incorrect_step.rate_alternative_responses = (
True
False
)

def asdict(self) -> Dict[str, Any]:
Expand Down
4 changes: 2 additions & 2 deletions libs/labelbox/tests/integration/test_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
{
"id": 2,
"name": "Incorrect",
"actions": ["regenerateSteps"],
"actions": ["regenerateSteps", "generateAndRateAlternativeSteps"],
},
]
assert step_reasoning_tool["definition"]["version"] == 1
Expand All @@ -364,6 +364,6 @@ def test_step_reasoning_ontology(chat_evaluation_ontology):
{
"id": 2,
"name": "Incorrect",
"actions": ["regenerateSteps"],
"actions": ["regenerateSteps", "generateAndRateAlternativeSteps"],
},
]
11 changes: 6 additions & 5 deletions libs/labelbox/tests/unit/test_unit_step_reasoning_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ def test_step_reasoning_as_dict_default():
{
"id": 2,
"name": "Incorrect",
"actions": ["regenerateSteps"],
"actions": [
"regenerateSteps",
"generateAndRateAlternativeSteps",
],
},
],
"version": 1,
Expand All @@ -26,7 +29,7 @@ def test_step_reasoning_as_dict_default():

def test_step_reasoning_as_dict_with_actions():
tool = StepReasoningTool(name="step reasoning")
tool.set_rate_alternative_responses()
tool.reset_rate_alternative_responses()
tool.reset_regenerate_conversations_after_incorrect_step()
assert tool.asdict() == {
"tool": "step-reasoning",
Expand All @@ -41,9 +44,7 @@ def test_step_reasoning_as_dict_with_actions():
{
"id": 2,
"name": "Incorrect",
"actions": [
"generateAndRateAlternativeSteps",
],
"actions": [],
},
],
"version": 1,
Expand Down
Loading