tfx icon indicating copy to clipboard operation
tfx copied to clipboard

AttributeError: 'list' object has no attribute 'type' [while running 'GenerateStatistics[train]/RunStatsGenerators/GenerateSlicedStatisticsImpl/TopKUniquesStatsGenerator/ToTopKTuples']

Open erikinfo opened this issue 6 years ago • 4 comments

My own project as well as the official components_keras documentation colab crashes when using StatisticsGen Data Validation with TFX == 0.22.0 (TF 2.2.0)


INFO:absl:Running driver for StatisticsGen
INFO:absl:MetadataStore with DB connection initialized
INFO:absl:Running executor for StatisticsGen
INFO:absl:Using 1 process(es) for Beam pipeline execution.
INFO:absl:Generating statistics for split train
INFO:absl:Statistics for split train written to /tmp/tfx-interactive-2020-06-27T07_49_32.365336-ebts3i3u/StatisticsGen/statistics/2/train.
INFO:absl:Generating statistics for split eval
INFO:absl:Statistics for split eval written to /tmp/tfx-interactive-2020-06-27T07_49_32.365336-ebts3i3u/StatisticsGen/statistics/2/eval.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.DoFnRunner.process()

98 frames
AttributeError: 'list' object has no attribute 'type'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow_data_validation/arrow/arrow_util.py in flatten_nested(array, return_parent_indices)
    192   parent_indices = None
    193 
--> 194   while is_list_like(array.type):
    195     if return_parent_indices:
    196       cur_parent_indices = array_util.GetFlattenedArrayParentIndices(

AttributeError: 'list' object has no attribute 'type' [while running 'GenerateStatistics[train]/RunStatsGenerators/GenerateSlicedStatisticsImpl/TopKUniquesStatsGenerator/ToTopKTuples']

https://colab.research.google.com/github/tensorflow/tfx/blob/master/docs/tutorials/tfx/components_keras.ipynb

erikinfo avatar Jun 27 '20 07:06 erikinfo

I have the same error

rikardocorp avatar Jun 28 '20 18:06 rikardocorp

Could reproduce the error in the Official Documentation. Please find the Github Gist. Thanks!

rmothukuru avatar Jun 29 '20 11:06 rmothukuru

Thanks for reporting this issue. You can work around this issue by downgrading to TFDV 0.22.0 while we work on a patch release.

caveness avatar Jun 29 '20 19:06 caveness

Closing this based on above comments.Please feel to reopen.

arghyaganguly avatar Apr 20 '21 08:04 arghyaganguly