Skip to content

Commit 301d817

Browse files
author
Val Brodsky
committed
Testing
1 parent 3c7646e commit 301d817

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass, field
2-
from typing import Any, Dict, List, Optional, Set, Tuple, Union
2+
from typing import Any, Dict, List, Set
33

44

55
@dataclass
@@ -19,16 +19,20 @@ def asdict(self) -> Dict[str, Any]:
1919
class VariantWithActions:
2020
id: int
2121
name: str
22-
actions: Set[str] = field(default_factory=set)
22+
actions: List[str] = field(default_factory=list)
2323
_available_actions: Set[str] = field(default_factory=set)
2424

2525
def set_actions(self, actions: Set[str]) -> None:
2626
for action in actions:
2727
if action in self._available_actions:
28-
self.actions.add(action)
28+
self.actions.append(action)
2929

3030
def reset_actions(self) -> None:
31-
self.actions = set()
31+
self.actions = []
3232

3333
def asdict(self) -> Dict[str, Any]:
34-
return {"id": self.id, "name": self.name, "actions": list(self.actions)}
34+
return {
35+
"id": self.id,
36+
"name": self.name,
37+
"actions": list(set(self.actions)),
38+
}

libs/labelbox/tests/integration/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
)
2222
from labelbox.schema.data_row import DataRowMetadataField
2323
from labelbox.schema.ontology_kind import OntologyKind
24+
from labelbox.schema.tool_building.fact_checking_tool import FactCheckingTool
2425
from labelbox.schema.tool_building.step_reasoning_tool import StepReasoningTool
25-
from labelbox.schema.tool_building.tool_type import ToolType
2626
from labelbox.schema.user import User
2727

2828

@@ -580,6 +580,7 @@ def chat_evaluation_ontology(client, rand_gen):
580580
name="model output multi ranking",
581581
),
582582
StepReasoningTool(name="step reasoning"),
583+
FactCheckingTool(name="fact checking"),
583584
],
584585
classifications=[
585586
Classification(

0 commit comments

Comments
 (0)