Skip to content

Commit b0838a0

Browse files
committed
remove has_any_of for consistency
1 parent 404eb17 commit b0838a0

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

libs/labelbox/src/labelbox/schema/workflow/project_filter.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,6 @@ def is_not_one_of(self, values: List[str]) -> Dict[str, Any]:
111111
"""
112112
return {self._field_name: values, "__operator": "is_not"}
113113

114-
def has_any_of(self, values: List[str]) -> Dict[str, Any]:
115-
"""Filter for items that have any of the specified values.
116-
117-
This is semantically equivalent to is_one_of but provides clearer intent
118-
for certain filter types like categories or annotations.
119-
120-
Args:
121-
values: List of IDs to match
122-
"""
123-
return {self._field_name: values}
124-
125114

126115
class RangeField:
127116
"""Field class for range-based filters like consensus_average."""
@@ -498,8 +487,8 @@ class ProjectWorkflowFilter(BaseModel):
498487
filters = ProjectWorkflowFilter([
499488
labeled_by.is_one_of(["user-123"]),
500489
dataset.is_one_of(["dataset-456"]),
501-
issue_category.has_any_of(["cat1", "cat2"]),
502-
annotation.has_any_of(["bbox", "segmentation"]),
490+
issue_category.is_one_of(["cat1", "cat2"]),
491+
annotation.is_one_of(["bbox", "segmentation"]),
503492
sample(20),
504493
labeled_at.between("2024-01-01", "2024-12-31"),
505494
metadata([condition.contains("tag", "test")]),

libs/labelbox/tests/integration/test_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def test_production_logic_node_with_comprehensive_filters(
458458
labeling_time.greater_than(1000),
459459
review_time.less_than_or_equal(100),
460460
dataset.is_one_of(["cm37vyets000z072314wxgt0l"]),
461-
annotation.has_any_of(["cm37w0e0500lf0709ba7c42m9"]),
461+
annotation.is_one_of(["cm37w0e0500lf0709ba7c42m9"]),
462462
consensus_average(0.17, 0.61),
463463
model_prediction(
464464
[

0 commit comments

Comments
 (0)