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(
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 )
Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments