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

CRITICAL? version 0.21.0 on pypi doesn't install record_based_tfxio.py, causing TFX imports to fail #3

Closed
jasonbrancazio opened this issue Feb 20, 2020 · 3 comments

Comments

@jasonbrancazio
Copy link

record_based_tfxio.py seems to have been added to tfx-bsl on February 10. The version of tfx_bsl on pypi, 0.21.0, does not install this file. This causes other imports to fail, e.g. CsvExampleGen.

STEPS TO REPRODUCE LOCALLY (assumes virtualenv and virtualenvwrapper are installed):

mkvirtualenv jb_testing_tfx_bsl --python=python3.7
pip install tfx_bsl
ls /Users/<my user name>/Virtualenvs/jb_testing_tfx_bsl/lib/python3.7/site-packages/tfx_bsl/tfxio
# observe that record_based_tfxio.py is not present.

STEPS TO REPRODUCE (colab):
Create a new Colab notebook

!pip install tfx==0.21.0 tensorflow==2.1
# then 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'
@jasonbrancazio
Copy link
Author

Looking more closely, I think this issue relates to the version of TFDV released 2 hours ago. It appears to rely on record_based_tfxio when it should not yet because an update to tfx_bsl containing record_based_tfxio has not yet been releasd.

@paulgc
Copy link
Member

paulgc commented Feb 20, 2020

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

@brills
Copy link
Contributor

brills commented Feb 20, 2020

tfx-bsl 0.21.1 has been released. Upgrading to it should resolve the problem.

@brills brills closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants