Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
336d690
Upgrade Struct2Tensor to TF 2.21.0 and Python 3.12/3.13
vkarampudi Apr 16, 2026
809c004
Fix pre-commit failures (whitespace and formatting)
vkarampudi Apr 16, 2026
a277df5
Fix Bazel version mismatch in setup.py
vkarampudi Apr 17, 2026
eb29590
Fix pre-commit and add missing dummy compatibility proxy
vkarampudi Apr 17, 2026
f1b16ed
Relax NumPy dependency in pyproject.toml
vkarampudi Apr 17, 2026
cba47c1
Relax NumPy constraint and remove hardcoded Bazel version in conda-bu…
vkarampudi Apr 17, 2026
ca57b3f
Fix macOS build by making sed portable in WORKSPACE
vkarampudi Apr 17, 2026
94c1600
Fix macOS linking failure by adding dynamic_lookup to linkopts
vkarampudi Apr 17, 2026
504fb14
Add test steps to conda-build.yml
vkarampudi Apr 17, 2026
7d9c05c
Move wheel upload after tests in conda-build.yml
vkarampudi Apr 17, 2026
26d9452
Use python -m pytest in conda-build.yml
vkarampudi Apr 17, 2026
c1d85cb
Rename local source dir during tests in conda-build.yml
vkarampudi Apr 17, 2026
adf5842
Pre-install pandas without isolation in conda-build.yml
vkarampudi Apr 17, 2026
ffc92f4
Use --no-build-isolation for pandas in conda-build.yml
vkarampudi Apr 17, 2026
a7b955e
Install Cython before pandas in conda-build.yml
vkarampudi Apr 17, 2026
2c23557
Use Cython<3 for pandas in conda-build.yml
vkarampudi Apr 17, 2026
e38e704
Install setuptools<70 in conda-build.yml
vkarampudi Apr 17, 2026
d6e3d33
Relax pandas constraint to <3 and simplify CI install
vkarampudi Apr 17, 2026
f605fba
Force protobuf 6.31.1 and use --no-deps for TFDV install
vkarampudi Apr 17, 2026
465c8d7
Install all TFDV dependencies manually in CI to fix collection errors
vkarampudi Apr 17, 2026
bec0380
Relax tfx-bsl and tensorflow-metadata constraints in CI
vkarampudi Apr 17, 2026
b8fa56b
Add dill dependency to CI
vkarampudi Apr 17, 2026
6c0a561
Add scipy and scikit-learn dependencies to CI
vkarampudi Apr 17, 2026
838c613
Copy testdata to installed package in CI
vkarampudi Apr 17, 2026
56ec762
Fix order of testdata copy in CI
vkarampudi Apr 19, 2026
a4d9a0b
Force install TF 2.21 and use --no-deps for tfx-bsl in CI
vkarampudi Apr 19, 2026
5b1e81f
Consolidate PyPI upload to conda-build.yml and remove redundant workf…
vkarampudi Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ build --protocopt=--experimental_allow_proto3_optional
# parameter 'user_link_flags' is deprecated and will be removed soon.
# It may be temporarily re-enabled by setting --incompatible_require_linker_input_cc_api=false
build --incompatible_require_linker_input_cc_api=false

# Force use of protoc from com_google_protobuf
build --proto_compiler=@com_google_protobuf//:protoc

# Add include path for Protobuf headers
build --cxxopt="-Iexternal/com_google_protobuf/src"
build --host_cxxopt="-Iexternal/com_google_protobuf/src"

# Disable Bzlmod to avoid conflicts with WORKSPACE
common --noenable_bzlmod
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.7.0
54 changes: 0 additions & 54 deletions .github/workflows/build.yml

This file was deleted.

55 changes: 52 additions & 3 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout
Expand Down Expand Up @@ -49,7 +49,6 @@ jobs:
fi
chmod +x /tmp/bazelisk
sudo mv /tmp/bazelisk /usr/local/bin/bazel
echo "USE_BAZEL_VERSION=6.5.0" >> $GITHUB_ENV
bazel --version

# Needed for Xcode 26.x in some CI environments; without this patch,
Expand All @@ -64,16 +63,66 @@ jobs:
- name: Install build tooling
shell: bash -l {0}
run: |
python -m pip install numpy~=1.22.0
python -m pip install numpy>=1.22.0
python -m pip install --upgrade pip build wheel "setuptools<69.3"

- name: Build the package
shell: bash -l {0}
run: |
python -m build --wheel --no-isolation

- name: Install wheel and dependencies
shell: bash -l {0}
run: |
python -m pip install "apache-beam[gcp]>=2.53,<3" "pandas>=1.0,<3" "numpy>=1.22.0"
python -m pip install "tensorflow-metadata>=1.17.1"
python -m pip install "tfx-bsl>=1.17.1" --no-deps
python -m pip install "tensorflow>=2.21,<2.22"
python -m pip install "absl-py>=0.9,<2.0.0" "joblib>=1.2.0" "pyarrow>=14" "pyfarmhash>=0.2.2,<0.4" "six>=1.12,<2" "dill" "scipy" "scikit-learn"
python -m pip install "protobuf==6.31.1" --force-reinstall
python -m pip install dist/*.whl --no-deps
python -m pip install pytest

- name: Run tests
shell: bash -l {0}
run: |
mv tensorflow_data_validation tensorflow_data_validation_bak
SITE_DIR=$(python -c "import site; print(site.getsitepackages()[0])")
cp -r tensorflow_data_validation_bak/statistics/generators/testdata $SITE_DIR/tensorflow_data_validation/statistics/generators/
mkdir -p /tmp/test_dir
cd /tmp/test_dir
python -m pytest --pyargs tensorflow_data_validation
cd -
mv tensorflow_data_validation_bak tensorflow_data_validation

- name: Upload wheel artifact
uses: actions/upload-artifact@v4.4.0
with:
name: data-validation-wheel-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/*.whl

upload_to_pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/tensorflow-data-validation/
permissions:
id-token: write
steps:
- name: Retrieve wheels
uses: actions/download-artifact@v4.1.8
with:
merge-multiple: true
path: wheels

- name: List the build artifacts
run: |
ls -lAs wheels/

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
packages_dir: wheels/
40 changes: 0 additions & 40 deletions .github/workflows/test.yml

This file was deleted.

9 changes: 9 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@

## Major Features and Improvements

* Upgraded to support TensorFlow 2.21.0.
* Added support for Python 3.12 and 3.13.
* Dropped support for Python 3.9.

## Bug Fixes and Other Changes

* Aligned Protobuf dependency to `>=6.0.0,<7.0.0`.
* Updated PyArrow dependency to `>=14`.
* Fixed C++ test build issues by defining missing `ASSERT_OK` and `EXPECT_OK` macros, replacing `LOG(FATAL)` with `abort()`, and fixing invalid Protobuf includes.
* Fixed Python test failures by updating `assertRaisesRegex` to expect `RuntimeError` wrapping `ValueError` in Beam pipelines.

## Known Issues

## Breaking Changes
Expand Down
121 changes: 84 additions & 37 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@ workspace(name = "tensorflow_data_validation")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

_PROTOBUF_COMMIT = "6.31.1"

http_archive(
name = "com_google_protobuf",
sha256 = "6e09bbc950ba60c3a7b30280210cd285af8d7d8ed5e0a6ed101c72aff22e8d88",
strip_prefix = "protobuf-%s" % _PROTOBUF_COMMIT,
urls = [
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v%s.zip" % _PROTOBUF_COMMIT,
],
patch_cmds = [
"touch BUILD",
],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

http_archive(
name = "zlib",
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
Expand All @@ -21,24 +39,24 @@ http_archive(
# Generic Bazel Support #
################################################################################

http_archive(
name = "rules_proto",
sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
strip_prefix = "rules_proto-6.0.2",
url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("@rules_proto//proto:setup.bzl", "rules_proto_setup")

rules_proto_setup()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()
# http_archive(
# name = "rules_proto",
# sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
# strip_prefix = "rules_proto-6.0.2",
# url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz",
# )
#
# load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
#
# rules_proto_dependencies()
#
# load("@rules_proto//proto:setup.bzl", "rules_proto_setup")
#
# rules_proto_setup()
#
# load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
#
# rules_proto_toolchains()

# Install version 0.9.0 of rules_foreign_cc, as default version causes an
# invalid escape sequence error to be raised, which can't be avoided with
Expand All @@ -61,27 +79,29 @@ rules_foreign_cc_dependencies()

http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
sha256 = "3b5b49006181f5f8ff626ef8ddceaa95e9bb8ad294f7b5d7b11ea9f7ddaf8c59",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.9.0/bazel-skylib-1.9.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.9.0/bazel-skylib-1.9.0.tar.gz",
],
)

_PROTOBUF_COMMIT = "4.25.6" # 4.25.6

http_archive(
name = "com_google_protobuf",
sha256 = "ff6e9c3db65f985461d200c96c771328b6186ee0b10bc7cb2bbc87cf02ebd864",
strip_prefix = "protobuf-%s" % _PROTOBUF_COMMIT,
urls = [
"https://github.com/protocolbuffers/protobuf/archive/v4.25.6.zip",
],
name = "rules_python",
sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
strip_prefix = "rules_python-0.31.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

local_repository(
name = "compatibility_proxy",
path = "third_party/dummy_compatibility_proxy",
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

# Use the last commit on the relevant release branch to update.
# LINT.IfChange(arrow_archive_version)
Expand All @@ -101,9 +121,28 @@ http_archive(

http_archive(
name = "com_google_absl",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz"],
strip_prefix = "abseil-cpp-20230802.1",
sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20250127.2.tar.gz"],
strip_prefix = "abseil-cpp-20250127.2",
sha256 = "f5a67394128fb4d9a18124820026014591942d9c882d9055d4d2412b13bf1c91",
patch_cmds = [
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/debugging/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/base/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/random/internal/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/synchronization/BUILD.bazel",
],
)

http_archive(
name = "abseil-cpp",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20250127.2.tar.gz"],
strip_prefix = "abseil-cpp-20250127.2",
sha256 = "f5a67394128fb4d9a18124820026014591942d9c882d9055d4d2412b13bf1c91",
patch_cmds = [
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/debugging/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/base/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/random/internal/BUILD.bazel",
"sed -i.bak '/@rules_cc\\/\\/cc\\/compiler:emscripten/d' absl/synchronization/BUILD.bazel",
],
)


Expand All @@ -128,14 +167,15 @@ http_archive(

# TODO(b/177694034): Follow the new format for tensorflow import after TF 2.5.
#here
TENSORFLOW_COMMIT = "3c92ac03cab816044f7b18a86eb86aa01a294d95" # 2.17.1
# Corresponds to tag v2.21.0
TENSORFLOW_COMMIT = "a481b10260dfdf833a1b16007eead49c1d7febf3"

http_archive(
name = "org_tensorflow_no_deps",
patches = [
"//third_party:tensorflow_expose_example_proto.patch",
],
sha256 = "317dd95c4830a408b14f3e802698eb68d70d81c7c7cfcd3d28b0ba023fe84a68",
sha256 = "ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921",
strip_prefix = "tensorflow-%s" % TENSORFLOW_COMMIT,
urls = [
"https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % TENSORFLOW_COMMIT,
Expand All @@ -152,6 +192,13 @@ http_archive(
urls = ["https://github.com/pybind/pybind11/archive/%s.zip" % PYBIND11_COMMIT],
)

http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
strip_prefix = "googletest-1.14.0",
sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
)

load("//third_party:python_configure.bzl", "local_python_configure")

local_python_configure(name = "local_config_python")
Expand Down Expand Up @@ -236,7 +283,7 @@ http_archive(
# Specify the minimum required bazel version.
load("@bazel_skylib//lib:versions.bzl", "versions")

versions.check("6.5.0")
versions.check("7.7.0")

# Please add all new TensorFlow Data Validation dependencies in workspace.bzl.
load("//tensorflow_data_validation:workspace.bzl", "tf_data_validation_workspace")
Expand Down
Loading
Loading