@@ -53,8 +53,8 @@ def add_predictions(
53
53
return MEAPredictionImport .create_from_file (
54
54
path = str (predictions ), ** kwargs )
55
55
else :
56
- return MEAPredictionImport .create_from_url (url = str ( predictions ),
57
- ** kwargs )
56
+ return MEAPredictionImport .create_from_url (
57
+ url = str ( predictions ), ** kwargs )
58
58
elif isinstance (predictions , Iterable ):
59
59
return MEAPredictionImport .create_from_objects (
60
60
predictions = predictions , ** kwargs )
@@ -82,12 +82,8 @@ def delete_model_run(self):
82
82
"""
83
83
ids_param = "ids"
84
84
query_str = """mutation DeleteModelRunPyApi($%s: ID!) {
85
- deleteModelRuns(where: {ids: [$%s]})}""" % (
86
- ids_param , ids_param
87
- )
88
- self .client .execute (query_str , {
89
- ids_param : str (self .uid )
90
- })
85
+ deleteModelRuns(where: {ids: [$%s]})}""" % (ids_param , ids_param )
86
+ self .client .execute (query_str , {ids_param : str (self .uid )})
91
87
92
88
def delete_annotation_groups (self , data_row_ids ):
93
89
""" Deletes annotation groups by data row ids for a model run.
@@ -101,8 +97,8 @@ def delete_annotation_groups(self, data_row_ids):
101
97
data_row_ids_param = "dataRowIds"
102
98
query_str = """mutation DeleteModelRunDataRowsPyApi($%s: ID!, $%s: [ID!]!) {
103
99
deleteModelRunDataRows(where: {modelRunId: $%s, dataRowIds: $%s})}""" % (
104
- model_run_id_param , data_row_ids_param , model_run_id_param , data_row_ids_param
105
- )
100
+ model_run_id_param , data_row_ids_param , model_run_id_param ,
101
+ data_row_ids_param )
106
102
self .client .execute (query_str , {
107
103
model_run_id_param : self .uid ,
108
104
data_row_ids_param : data_row_ids
@@ -123,4 +119,3 @@ def url(self):
123
119
app_url = self .client .app_url
124
120
endpoint = f"{ app_url } /models/{ self .model_id } /{ self .model_run_id } /AllDatarowsSlice/{ self .uid } ?view=carousel"
125
121
return endpoint
126
-
0 commit comments