Skip to content

Commit 0ce4ca2

Browse files
author
Diego Ardila
committed
Review feedback
1 parent 2b9483c commit 0ce4ca2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

nucleus/annotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ def check_all_annotation_paths_remote(
215215
annotations: Sequence[Union[Annotation]],
216216
):
217217
for annotation in annotations:
218-
if hasattr(annotation, "mask_url"):
219-
if is_local_path(getattr(annotation, "mask_url")):
218+
if hasattr(annotation, MASK_URL_KEY):
219+
if is_local_path(getattr(annotation, MASK_URL_KEY)):
220220
raise ValueError(
221221
f"Found an annotation with a local path, which cannot be uploaded asynchronously. Use a remote path instead. {annotation}"
222222
)

nucleus/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create_run(
4545
Union[BoxPrediction, PolygonPrediction, SegmentationPrediction]
4646
],
4747
metadata: Optional[Dict] = None,
48-
asynchronous=False,
48+
asynchronous: bool = False,
4949
) -> ModelRun:
5050
payload: dict = {
5151
NAME_KEY: name,

nucleus/model_run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
ANNOTATIONS_KEY,
99
BOX_TYPE,
1010
DEFAULT_ANNOTATION_UPDATE_MODE,
11+
JOB_ID_KEY,
1112
POLYGON_TYPE,
1213
REQUEST_ID_KEY,
1314
SEGMENTATION_TYPE,
@@ -115,7 +116,7 @@ def predict(
115116
route=f"modelRun/{self.model_run_id}/predict?async=1",
116117
)
117118

118-
return AsyncJob(response["job_id"], self._client)
119+
return AsyncJob(response[JOB_ID_KEY], self._client)
119120
else:
120121
return self._client.predict(self.model_run_id, annotations, update)
121122

0 commit comments

Comments
 (0)