Registry / ai-ml / tensorflow-data-validation

tensorflow-data-validation

JSON →
library1.21.0pypypiunverified

TensorFlow Data Validation (TFDV) is a library for exploring and validating machine learning data. It computes descriptive statistics, infers a schema, detects anomalies, and supports data drift/skew detection. Current version is 1.17.0 (requires Python 3.9+), with releases following TensorFlow's cadence.

pip install tensorflow-data-validation
INSTALL
IMPORT
SIG · TENSORFLOW-DATA-VA
T
tensorflow-data-validation
ai-mlpythonv1.21.0
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tensorflow_data_validation
import tensorflow_data_validation as tfdv
import tfdv
tfdv is not a top-level module; must import tensorflow_data_validation
StatsOptions
from tensorflow_data_validation.utils.stats_options import StatsOptions
StatsOptions is used to customize statistics computation

Compute statistics from a DataFrame, infer schema, and validate new data.

import tensorflow_data_validation as tfdv import pandas as pd data = pd.DataFrame({ 'feature1': [1, 2, 3, 4, 5], 'feature2': ['a', 'b', 'c', 'd', 'e'] }) # Generate statistics stats = tfdv.generate_statistics_from_dataframe(data) # Infer schema schema = tfdv.infer_schema(stats) print(schema) # Validate new data test_data = pd.DataFrame({ 'feature1': [1, 2, 6], 'feature2': ['x', 'y', 'z'] }) anomalies = tfdv.validate_statistics( tfdv.generate_statistics_from_dataframe(test_data), schema ) print(anomalies)
Debug
Known issues
breakingTFDV 1.0+ changed the API for `generate_statistics_from_csv` and `generate_statistics_from_dataframe`. The old `tfdv.generate_statistics` is deprecated.
fix
Use `generate_statistics_from_csv` or `generate_statistics_from_dataframe` instead of `generate_statistics`.
affects: <1.0
deprecated`tfdv.visualize_statistics` is deprecated in favor of using `tfdv.utils.display_util.display_stats` for Jupyter visualization.
fix
Use `from tensorflow_data_validation.utils.display_util import display_stats`.
affects: >=1.10
gotchaTFDV statistics generation may be slow on large datasets; use Apache Beam for distributed processing.
fix
Install apache-beam (`pip install apache-beam`) and use `generate_statistics_from_csv` with `beam_pipeline_args`.
affects: all
gotchaSchema inference from small samples may produce overly strict constraints; use `tfdv.update_schema_with_stats` or manual tuning.
fix
Consider using `tfdv.update_schema_with_stats` to relax schema constraints based on full statistics.
affects: all
Upgrade
Version history
1.21.0latest on PyPI · released Jun 11, 2026
Audit
Dependencies
tensorflowrequiredTFDV relies on TF for internal ops and data handling
apache-beamoptionalRequired for distributed processing (optional in some installs)
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
1
Resources
tensorflow-data-validation — pip install tensorflow-data-validation · libregistry