Skip to content

Commit c60b61f

Browse files
author
Matt Sokoloff
committed
tests passing
1 parent 9de7a6e commit c60b61f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

labelbox/schema/annotation_import.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def create_from_url(cls, client: "labelbox.Client", model_run_id: str,
219219
"fileUrl": url,
220220
"modelRunId": model_run_id,
221221
'name': name
222-
})["modelErrorAnalysisPredictionImport"])
222+
})["createModelErrorAnalysisPredictionImport"])
223223
else:
224224
raise ValueError(f"Url {url} is not reachable")
225225

@@ -252,11 +252,11 @@ def from_name(cls, client: "labelbox.Client", model_run_id: str,
252252
response = response["modelErrorAnalysisPredictionImport"]
253253
if as_json:
254254
return response
255-
return cls(client, response["modelErrorAnalysisPredictionImport"])
255+
return cls(client, response)
256256

257257
@classmethod
258258
def _get_url_mutation(cls) -> str:
259-
return """mutation createMeaPredictionImportPyApi($modelRunId : ID!, $name: String!, $fileUrl: String!) {
259+
return """mutation createMEAPredictionImportPyApi($modelRunId : ID!, $name: String!, $fileUrl: String!) {
260260
createModelErrorAnalysisPredictionImport(data: {
261261
modelRunId: $modelRunId
262262
name: $name
@@ -266,7 +266,7 @@ def _get_url_mutation(cls) -> str:
266266

267267
@classmethod
268268
def _get_file_mutation(cls) -> str:
269-
return """mutation createMeaPredictionImportPyApi($modelRunId : ID!, $name: String!, $file: Upload!, $contentLength: Int!) {
269+
return """mutation createMEAPredictionImportPyApi($modelRunId : ID!, $name: String!, $file: Upload!, $contentLength: Int!) {
270270
createModelErrorAnalysisPredictionImport(data: {
271271
modelRunId: $modelRunId name: $name filePayload: { file: $file, contentLength: $contentLength}
272272
}) {%s}
@@ -406,7 +406,7 @@ def from_name(cls, client: "labelbox.Client", project_id: str,
406406
response = response["modelAssistedLabelingPredictionImport"]
407407
if as_json:
408408
return response
409-
return cls(client, response["modelAssistedLabelingPredictionImport"])
409+
return cls(client, response)
410410

411411
@classmethod
412412
def _get_url_mutation(cls) -> str:

tests/integration/bulk_import/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from labelbox.schema.bulk_import_request import BulkImportRequest
21
import uuid
32

43
import pytest
@@ -305,7 +304,7 @@ def model_run(client, rand_gen, configured_project, annotation_submit_fn,
305304
configured_project.enable_model_assisted_labeling()
306305
ontology = configured_project.ontology()
307306

308-
upload_task = BulkImportRequest.create_from_objects(
307+
upload_task = MALPredictionImport.create_from_objects(
309308
client, configured_project.uid, f'mal-import-{uuid.uuid4()}',
310309
model_run_predictions)
311310
upload_task.wait_until_done()

0 commit comments

Comments
 (0)