Skip to content

Commit 9c1782f

Browse files
Remove old logic
1 parent b02b57a commit 9c1782f

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

labelbox/schema/model_run.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ def upsert_labels(self, label_ids, timeout_seconds=600):
2626
ID of newly generated async task
2727
"""
2828

29+
if len(label_ids) < 1:
30+
raise ValueError("Must provide at least one label id")
31+
2932
sleep_time = 5
3033

3134
mutation_name = 'createMEAModelRunLabelRegistrationTask'
@@ -49,21 +52,6 @@ def upsert_labels(self, label_ids, timeout_seconds=600):
4952

5053
time.sleep(sleep_time)
5154

52-
def upsert_labels(self, label_ids):
53-
54-
if len(label_ids) < 1:
55-
raise ValueError("Must provide at least one label id")
56-
57-
query_str = """mutation upsertModelRunLabelsPyApi($modelRunId: ID!, $labelIds : [ID!]!) {
58-
upsertModelRunLabels(where : { id : $modelRunId}, data : {labelIds: $labelIds})}
59-
"""
60-
res = self.client.execute(query_str, {
61-
'modelRunId': self.uid,
62-
'labelIds': label_ids
63-
})
64-
# TODO: Return a task
65-
return True
66-
6755
def add_predictions(
6856
self,
6957
name: str,

0 commit comments

Comments
 (0)