Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

components that depend on TFDV fail to import as a result of the release of TFDV 0.21.2 #1305

Closed
jasonbrancazio opened this issue Feb 20, 2020 · 4 comments
Assignees
Labels
bug Something isn't working stat:awaiting response

Comments

@jasonbrancazio
Copy link

This is related to tensorflow/tfx-bsl#3

STEPS TO REPRODUCE (colab)

!pip install tfx==0.21.0 tensorflow==2.1
# restart runtime
from tfx.components import CsvExampleGen

observe the following error:

<ipython-input-1-b8326c471c1e> in <module>()
----> 1 from tfx.components import CsvExampleGen

4 frames
/usr/local/lib/python3.6/dist-packages/tfx/components/__init__.py in <module>()
     26 from tfx.components.example_gen.csv_example_gen.component import CsvExampleGen
     27 from tfx.components.example_gen.import_example_gen.component import ImportExampleGen
---> 28 from tfx.components.example_validator.component import ExampleValidator
     29 from tfx.components.model_validator.component import ModelValidator
     30 from tfx.components.pusher.component import Pusher

/usr/local/lib/python3.6/dist-packages/tfx/components/example_validator/component.py in <module>()
     25 from tfx.components.base import base_component
     26 from tfx.components.base import executor_spec
---> 27 from tfx.components.example_validator import executor
     28 from tfx.types import standard_artifacts
     29 from tfx.types.standard_component_specs import ExampleValidatorSpec

/usr/local/lib/python3.6/dist-packages/tfx/components/example_validator/executor.py in <module>()
     23 
     24 import absl
---> 25 import tensorflow_data_validation as tfdv
     26 
     27 from tfx import types

/usr/local/lib/python3.6/dist-packages/tensorflow_data_validation/__init__.py in <module>()
     31 
     32 # Import coders.
---> 33 from tensorflow_data_validation.coders.csv_decoder import DecodeCSV
     34 from tensorflow_data_validation.coders.tf_example_decoder import DecodeTFExample
     35 

/usr/local/lib/python3.6/dist-packages/tensorflow_data_validation/coders/csv_decoder.py in <module>()
     24 from tensorflow_data_validation import types
     25 from tfx_bsl.coders import csv_decoder as csv_decoder
---> 26 from tfx_bsl.tfxio import record_based_tfxio
     27 from typing import List, Iterable, Optional, Text
     28 

ImportError: cannot import name 'record_based_tfxio'

downgrading to tfdv 0.21.1 resolves the issue.

@paulgc
Copy link
Member

paulgc commented Feb 20, 2020

@jasonbrancazio There will be a new tfx_bsl release today which should fix this issue.

@chongkong chongkong added the bug Something isn't working label Feb 21, 2020
@chongkong chongkong assigned chongkong and paulgc and unassigned chongkong Feb 21, 2020
@jasonbrancazio
Copy link
Author

jasonbrancazio commented Feb 24, 2020

@MiladShahidi I saw that as well. TFDV removed TFExampleDecoder, but the components tutorial hasn't yet been updated. It be should filed as an issue separate from this bug, though, as this bug was about record_based_tfxio and not TFExampleDecoder.

@rmothukuru
Copy link
Contributor

@jasonbrancazio,
From the above comment, we understand that the issue has been resolved. Can you please confirm if we can close this issue. Thanks!

@jasonbrancazio
Copy link
Author

resolved, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stat:awaiting response
Projects
None yet
Development

No branches or pull requests

4 participants