File tree 1 file changed +8
-3
lines changed
pkg/workloads/cortex/tf_api
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,19 @@ def extract_signature(signature_def, signature_key):
263
263
if signature_key is None :
264
264
if len (available_keys ) == 1 :
265
265
logger .info (
266
- "signature_key was not configured by user, using signature key '{}' found in signature def map" .format (
266
+ "tf_signature_key was not configured by user, using signature key '{}' ( found in the signature def map) " .format (
267
267
available_keys [0 ]
268
268
)
269
269
)
270
270
signature_key = available_keys [0 ]
271
+ elif "predict" in signature_def :
272
+ logger .info (
273
+ "tf_signature_key was not configured by user, using signature key 'predict' (found in the signature def map)"
274
+ )
275
+ signature_key = "predict"
271
276
else :
272
277
raise UserException (
273
- "signature_key was not configured by user, please specify one the following keys '{}' found in signature def map" .format (
278
+ "tf_signature_key was not configured by user, please specify one the following keys '{}' ( found in the signature def map) " .format (
274
279
"', '" .join (available_keys )
275
280
)
276
281
)
@@ -281,7 +286,7 @@ def extract_signature(signature_def, signature_key):
281
286
possibilities_str = "keys: '{}'" .format ("', '" .join (available_keys ))
282
287
283
288
raise UserException (
284
- "signature_key '{}' was not found in signature def map, but found the following {}" .format (
289
+ "tf_signature_key '{}' was not found in signature def map, but found the following {}" .format (
285
290
signature_key , possibilities_str
286
291
)
287
292
)
You can’t perform that action at this time.
0 commit comments