Skip to content

Commit f5d3552

Browse files
committed
Removed labeling front end and made private objects
1 parent 5140584 commit f5d3552

File tree

4 files changed

+6
-27
lines changed

4 files changed

+6
-27
lines changed

libs/labelbox/src/labelbox/client.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -425,17 +425,8 @@ def get_datasets(self, where=None) -> PaginatedCollection:
425425
"""
426426
return self._get_all(Entity.Dataset, where)
427427

428-
def get_labeling_frontends(self, where=None) -> List[LabelingFrontend]:
429-
"""Fetches all the labeling frontends.
430-
431-
>>> frontend = client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
432-
433-
Args:
434-
where (Comparison, LogicalOperation or None): The `where` clause
435-
for filtering.
436-
Returns:
437-
An iterable of LabelingFrontends (typically a PaginatedCollection).
438-
"""
428+
def _get_labeling_frontends(self, where=None) -> List[LabelingFrontend]:
429+
"""Private method to obtain labeling front ends"""
439430
return self._get_all(Entity.LabelingFrontend, where)
440431

441432
def _create(self, db_object_type, data, extra_params={}):

libs/labelbox/src/labelbox/schema/labeling_frontend.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@
33

44

55
class LabelingFrontend(DbObject):
6-
"""Label editor.
7-
8-
Represents an HTML / JavaScript UI that is used to generate
9-
labels. “Editor” is the default Labeling Frontend that comes in every
10-
organization. You can create new labeling frontends for an organization.
11-
12-
Attributes:
13-
name (str)
14-
description (str)
15-
iframe_url_path (str)
16-
17-
projects (Relationship): `ToMany` relationship to Project
18-
"""
6+
"""Private db object representing a projects label editor"""
197

208
name = Field.String("name")
219
description = Field.String("description")

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ def _connect_default_labeling_front_end(self, ontology_as_dict: dict):
692692
): # Chat evaluation projects are automatically set up via the same api that creates a project
693693
warnings.warn("Connecting default labeling editor for the project.")
694694
labeling_frontend = next(
695-
self.client.get_labeling_frontends(
695+
self.client._get_labeling_frontends(
696696
where=Entity.LabelingFrontend.name == "Editor"
697697
)
698698
)

libs/labelbox/tests/integration/test_labeling_frontend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
def test_get_labeling_frontends(client):
88
filtered_frontends = list(
9-
client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
9+
client._get_labeling_frontends(where=LabelingFrontend.name == "Editor")
1010
)
1111
assert len(filtered_frontends)
1212

1313

1414
def test_labeling_frontend_connecting_to_project(project):
1515
client = project.client
1616
default_labeling_frontend = next(
17-
client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
17+
client._get_labeling_frontends(where=LabelingFrontend.name == "Editor")
1818
)
1919

2020
assert project.labeling_frontend() is None

0 commit comments

Comments
 (0)