Mentions key if tf.Feature parsing fails due to unsupported value.

PiperOrigin-RevId: 354608352
Change-Id: I06846b11223e1b83f35b850983437ba549b1cdd3
This commit is contained in:
A. Unique TensorFlower 2021-01-29 14:13:01 -08:00 committed by TensorFlower Gardener
parent 274bace09e
commit ee2fe8a0a2

View File

@ -448,8 +448,8 @@ class _ParseOpParams(object):
for key in sorted(features.keys()):
feature = features[key]
if not isinstance(feature, tuple(types)):
raise ValueError("Unsupported %s %s." %
(type(feature).__name__, feature))
raise ValueError("Unsupported %s %s for key '%s')." %
(type(feature).__name__, feature, key))
params._add_feature(key, feature) # pylint: disable=protected-access
params._validate() # pylint: disable=protected-access
return params