We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0666fb commit febc293Copy full SHA for febc293
pkg/workloads/tf_api/api.py
@@ -357,7 +357,20 @@ def predict(deployment_name, api_name):
357
api["name"]
358
)
359
360
- return prediction_failed(sample, str(e))
+
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\nExpected shema:\n" + util.pp_str(
370
+ signature_def["predict"]["inputs"]
371
+ )
372
373
+ return prediction_failed(sample, str(e) + schemaStr)
374
375
predictions.append(result)
376
0 commit comments