Skip to content

Commit 54596e2

Browse files
authored
Merge pull request #212 from Labelbox/ms/remove-predictions
remove predictions and prediction models
2 parents b966620 + 417a8c3 commit 54596e2

File tree

9 files changed

+6
-85
lines changed

9 files changed

+6
-85
lines changed

docs/source/index.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,6 @@ Organization
102102
:members:
103103
:show-inheritance:
104104

105-
Prediction
106-
---------------------------------
107-
108-
.. automodule:: labelbox.schema.prediction
109-
:members: Prediction
110-
:exclude-members: PredictionModel
111-
:show-inheritance:
112-
113-
PredictionModel
114-
---------------------------------
115-
.. automodule:: labelbox.schema.prediction
116-
:members: PredictionModel
117-
:exclude-members: Prediction
118-
:show-inheritance:
119-
:noindex:
120-
121105
Project
122106
------------------------------
123107

labelbox/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from labelbox.schema.asset_metadata import AssetMetadata
1616
from labelbox.schema.asset_attachment import AssetAttachment
1717
from labelbox.schema.webhook import Webhook
18-
from labelbox.schema.prediction import Prediction, PredictionModel
1918
from labelbox.schema.ontology import Ontology, OntologyBuilder, Classification, Option, Tool
2019
from labelbox.schema.role import Role, ProjectRole
2120
from labelbox.schema.invite import Invite, InviteLimit

labelbox/schema/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import labelbox.schema.task
1313
import labelbox.schema.user
1414
import labelbox.schema.webhook
15-
import labelbox.schema.prediction
1615
import labelbox.schema.ontology
1716
import labelbox.schema.invite
1817
import labelbox.schema.role

labelbox/schema/data_row.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class DataRow(DbObject, Updateable, BulkDeletable):
2525
labels (Relationship): `ToMany` relationship to Label
2626
attachments (Relationship) `ToMany` relationship with AssetAttachment
2727
metadata (Relationship): This Relationship is Deprecated. Please use `DataRow.attachments()` instead
28-
predictions (Relationship): `ToMany` relationship to Prediction
2928
"""
3029
external_id = Field.String("external_id")
3130
row_data = Field.String("row_data")
@@ -47,7 +46,6 @@ class DataRow(DbObject, Updateable, BulkDeletable):
4746
"`DataRow.metadata()` is deprecated. Use `DataRow.attachments()` instead."
4847
)
4948
attachments = Relationship.ToMany("AssetAttachment", False, "attachments")
50-
predictions = Relationship.ToMany("Prediction", False)
5149

5250
supported_meta_types = supported_attachment_types = {
5351
attachment_type.value

labelbox/schema/prediction.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

labelbox/schema/project.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ class Project(DbObject, Updateable, Deletable):
5151
labeling_parameter_overrides (Relationship): `ToMany` relationship to LabelingParameterOverride
5252
webhooks (Relationship): `ToMany` relationship to Webhook
5353
benchmarks (Relationship): `ToMany` relationship to Benchmark
54-
active_prediction_model (Relationship): `ToOne` relationship to PredictionModel
55-
predictions (Relationship): `ToMany` relationship to Prediction
5654
ontology (Relationship): `ToOne` relationship to Ontology
5755
"""
5856
name = Field.String("name")
@@ -75,9 +73,6 @@ class Project(DbObject, Updateable, Deletable):
7573
"LabelingParameterOverride", False, "labeling_parameter_overrides")
7674
webhooks = Relationship.ToMany("Webhook", False)
7775
benchmarks = Relationship.ToMany("Benchmark", False)
78-
active_prediction_model = Relationship.ToOne("PredictionModel", False,
79-
"active_prediction_model")
80-
predictions = Relationship.ToMany("Prediction", False)
8176
ontology = Relationship.ToOne("Ontology", True)
8277

8378
def members(self):

tests/integration/bulk_import/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import uuid
2+
23
import pytest
34

45
from labelbox.schema.labeling_frontend import LabelingFrontend
@@ -115,7 +116,6 @@ def configured_project(client, project, ontology, dataset):
115116
def prediction_id_mapping(configured_project):
116117
#Maps tool types to feature schema ids
117118
ontology = configured_project.ontology().normalized
118-
inferences = []
119119
datarows = [d for d in list(configured_project.datasets())[0].data_rows()]
120120
result = {}
121121

tests/integration/test_user_management.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from labelbox import ProjectRole
2+
import pytest
23

34

45
def test_org_invite(client, organization, environ, queries):
@@ -72,6 +73,9 @@ def test_project_invite(client, organization, project_pack, queries):
7273
queries.cancel_invite(client, invite.uid)
7374

7475

76+
@pytest.mark.skip(
77+
"Unable to programatically create user without accepting an email invite. Add back once there is a workaround."
78+
)
7579
def test_member_management(client, organization, project, project_based_user):
7680
roles = client.get_roles()
7781
assert not len(list(project_based_user.projects()))

tools/api_reference_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
labelbox.Project, labelbox.Dataset, labelbox.DataRow, labelbox.Label,
4343
labelbox.AssetMetadata, labelbox.LabelingFrontend, labelbox.Task,
4444
labelbox.Webhook, labelbox.User, labelbox.Organization, labelbox.Review,
45-
labelbox.Prediction, labelbox.PredictionModel, LabelerPerformance
45+
LabelerPerformance
4646
]
4747

4848
ERROR_CLASSES = [LabelboxError] + LabelboxError.__subclasses__()

0 commit comments

Comments
 (0)