File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,20 @@ def predict(deployment_name, api_name):
357
357
api ["name" ]
358
358
)
359
359
)
360
- return prediction_failed (sample , str (e ))
360
+
361
+ # Show signature def for external models (since we don't validate input)
362
+ schemaStr = ""
363
+ signature_def = local_cache ["metadata" ]["signatureDef" ]
364
+ if (
365
+ not util .is_resource_ref (api ["model" ])
366
+ and signature_def .get ("predict" ) is not None # Just to be safe
367
+ and signature_def ["predict" ].get ("inputs" ) is not None # Just to be safe
368
+ ):
369
+ schemaStr = "\n \n Expected shema:\n " + util .pp_str (
370
+ signature_def ["predict" ]["inputs" ]
371
+ )
372
+
373
+ return prediction_failed (sample , str (e ) + schemaStr )
361
374
362
375
predictions .append (result )
363
376
You can’t perform that action at this time.
0 commit comments