data-validation
data-validation copied to clipboard
The latest numpy release 1.24.0 broke TFDV
TFDV allows 'numpy>=1.16,<2'. However, the latest numpy version 1.24.0
breaks TFDV. I encountered the following error in a TFDV-related component via TFX.
...
venv/lib/python3.8/site-packages/tfx/components/__init__.py:22: in <module>
from tfx.components.example_validator.component import ExampleValidator
venv/lib/python3.8/site-packages/tfx/components/example_validator/component.py:20: in <module>
from tfx.components.example_validator import executor
venv/lib/python3.8/site-packages/tfx/components/example_validator/executor.py:20: in <module>
import tensorflow_data_validation as tfdv
venv/lib/python3.8/site-packages/tensorflow_data_validation/__init__.py:18: in <module>
from tensorflow_data_validation.api.stats_api import GenerateStatistics
venv/lib/python3.8/site-packages/tensorflow_data_validation/api/stats_api.py:50: in <module>
from tensorflow_data_validation.statistics import stats_impl
venv/lib/python3.8/site-packages/tensorflow_data_validation/statistics/stats_impl.py:28: in <module>
from tensorflow_data_validation.statistics.generators import image_stats_generator
venv/lib/python3.8/site-packages/tensorflow_data_validation/statistics/generators/image_stats_generator.py:99: in <module>
class TfImageDecoder(ImageDecoderInterface):
venv/lib/python3.8/site-packages/tensorflow_data_validation/statistics/generators/image_stats_generator.py:146: in TfImageDecoder
def get_formats(self, values: List[np.object]) -> np.ndarray:
venv/lib/python3.8/site-packages/numpy/__init__.py:284: in __getattr__
raise AttributeError("module {!r} has no attribute "
E AttributeError: module 'numpy' has no attribute 'object'
Python version: 3.8.12 TFX version: 1.6.2 TFDV version: 1.6.0 numpy version: 1.24.0