tensorflow / tfx-addons

Developers helping developers. TFX-Addons is a collection of community projects to build new components, examples, libraries, and tools for TFX. The projects are organized under the auspices of the special interest group, SIG TFX-Addons. Join the group at http://goo.gle/tfx-addons-group
Apache License 2.0
125 stars 64 forks source link

_parse_example error when input contains SparseTensor in predictions-to-bigquery component. #221

Closed cfezequiel closed 1 year ago

cfezequiel commented 1 year ago

Expected Behavior

executor._parse_example should be able to parse tf.sparse.SparseTensor values that are derived from the input serialized TFRecord data.

Actual Behavior

executor._parse_example raises an error when parsing a tf.sparse.SparseTensor value due to:

value_list = tensor.numpy().tolist()

where tensor is expected to be tf.Tensor.

Steps to Reproduce the Problem

  1. Run executor._parse_example using a serialized tf.Example proto with tf.sparse.SparseTensor value.