File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -215,8 +215,8 @@ def check_all_annotation_paths_remote(
215
215
annotations : Sequence [Union [Annotation ]],
216
216
):
217
217
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 )):
220
220
raise ValueError (
221
221
f"Found an annotation with a local path, which cannot be uploaded asynchronously. Use a remote path instead. { annotation } "
222
222
)
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def create_run(
45
45
Union [BoxPrediction , PolygonPrediction , SegmentationPrediction ]
46
46
],
47
47
metadata : Optional [Dict ] = None ,
48
- asynchronous = False ,
48
+ asynchronous : bool = False ,
49
49
) -> ModelRun :
50
50
payload : dict = {
51
51
NAME_KEY : name ,
Original file line number Diff line number Diff line change 8
8
ANNOTATIONS_KEY ,
9
9
BOX_TYPE ,
10
10
DEFAULT_ANNOTATION_UPDATE_MODE ,
11
+ JOB_ID_KEY ,
11
12
POLYGON_TYPE ,
12
13
REQUEST_ID_KEY ,
13
14
SEGMENTATION_TYPE ,
@@ -115,7 +116,7 @@ def predict(
115
116
route = f"modelRun/{ self .model_run_id } /predict?async=1" ,
116
117
)
117
118
118
- return AsyncJob (response ["job_id" ], self ._client )
119
+ return AsyncJob (response [JOB_ID_KEY ], self ._client )
119
120
else :
120
121
return self ._client .predict (self .model_run_id , annotations , update )
121
122
You can’t perform that action at this time.
0 commit comments