From 9d5be22751074b2a7326c23da6c5bf9535e965de Mon Sep 17 00:00:00 2001 From: Venkata Sai Madhur Karampudi Date: Mon, 6 Jul 2026 22:40:27 +0000 Subject: [PATCH] Merge 0.52.0 release updates into master and bump development version to 0.53.0.dev --- .github/workflows/build.yml | 13 +++++++++-- .github/workflows/docs.yml | 4 ++-- .github/workflows/test.yml | 2 +- RELEASE.md | 23 +++++++++++++++++++ fairness_indicators/example_model_test.py | 3 ++- fairness_indicators/tutorial_utils/util.py | 3 ++- .../tutorial_utils/util_test.py | 4 ++-- fairness_indicators/version.py | 2 +- pyproject.toml | 1 + setup.py | 21 ++++++++++------- tensorboard_plugin/pytest.ini | 1 + tensorboard_plugin/setup.py | 23 +++++++++++-------- .../RELEASE.md | 23 +++++++++++++++++++ .../plugin_test.py | 3 ++- .../version.py | 2 +- 15 files changed, 99 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ed235e..d9c6d90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,15 @@ on: push: branches: - master + - r* + tags: + - '*' pull_request: branches: - master + - r* + release: + types: [published] workflow_dispatch: jobs: @@ -15,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout @@ -33,8 +39,10 @@ jobs: - name: Build wheels run: | python -m build --wheel --sdist + cd tensorboard_plugin && python -m build --wheel --sdist && cd .. mkdir wheelhouse mv dist/* wheelhouse/ + mv tensorboard_plugin/dist/* wheelhouse/ - name: List and check wheels run: | pip install twine pkginfo>=1.11.0 @@ -49,7 +57,7 @@ jobs: 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') + if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || (github.event_name == 'workflow_dispatch') needs: [build] environment: name: pypi @@ -70,6 +78,7 @@ jobs: - name: Upload to PyPI uses: pypa/gh-action-pypi-publish@release/v1.12 with: + password: ${{ secrets.PYPI_API_TOKEN || secrets.PYPI_TOKEN || secrets.PYPI_PASSWORD }} packages_dir: wheels/ repository_url: https://pypi.org/legacy/ verify_metadata: false diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4b33fe1..e2e6fcb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,10 +20,10 @@ jobs: git config user.email 41898282+github-actions[bot]@users.noreply.github.com if: (github.event_name != 'pull_request') - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.10' cache: 'pip' cache-dependency-path: | setup.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1648354..7ddf111 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: - python-version: ['3.9', '3.10'] + python-version: ['3.10', '3.11', '3.12', '3.13'] package-root-dir: ['./', './tensorboard_plugin'] steps: diff --git a/RELEASE.md b/RELEASE.md index ca4f448..b725cd6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,6 +10,29 @@ ## Deprecations +# Version 0.52.0 + +## Major Features and Improvements + +* N/A + +## Bug Fixes and Other Changes + +* Depends on `tensorflow>=2.21,<2.22`. +* Depends on `tensorflow-data-validation>=1.21.0,<1.22.0`. +* Depends on `tensorflow-model-analysis>=0.52.0,<0.53.0`. +* Depends on `protobuf>=6.0.0,<7.0.0`. +* Added conditional NumPy dependency (`numpy>=1.23.5,<2.0.0` for Python < 3.13 and `numpy>=2.1.0` for Python >= 3.13). +* Removed Python 3.9 support and added support for Python 3.10, 3.11, 3.12, and 3.13. + +## Breaking Changes + +* N/A + +## Deprecations + +* N/A + # Version 0.48.0 ## Major Features and Improvements diff --git a/fairness_indicators/example_model_test.py b/fairness_indicators/example_model_test.py index cbc3a8a..582ad7e 100644 --- a/fairness_indicators/example_model_test.py +++ b/fairness_indicators/example_model_test.py @@ -28,6 +28,7 @@ import tensorflow_model_analysis as tfma from google.protobuf import text_format from tensorflow import keras +from tensorflow_model_analysis.proto import config_pb2 as tfma_config from fairness_indicators import example_model @@ -113,7 +114,7 @@ def test_example_model(self): } } """, - tfma.EvalConfig(), + tfma_config.EvalConfig(), ) validate_tf_file_path = self._write_tf_records(data) diff --git a/fairness_indicators/tutorial_utils/util.py b/fairness_indicators/tutorial_utils/util.py index c7d3fd1..a06f38b 100644 --- a/fairness_indicators/tutorial_utils/util.py +++ b/fairness_indicators/tutorial_utils/util.py @@ -22,6 +22,7 @@ import tensorflow as tf import tensorflow_model_analysis as tfma from google.protobuf import text_format +from tensorflow_model_analysis.proto import config_pb2 as tfma_config TEXT_FEATURE = "comment_text" LABEL = "toxicity" @@ -219,7 +220,7 @@ def get_eval_results( slice_selection, "true" if compute_confidence_intervals else "false", ), - tfma.EvalConfig(), + tfma_config.EvalConfig(), ) eval_shared_model = tfma.default_eval_shared_model( diff --git a/fairness_indicators/tutorial_utils/util_test.py b/fairness_indicators/tutorial_utils/util_test.py index 36666c6..1a8f71e 100644 --- a/fairness_indicators/tutorial_utils/util_test.py +++ b/fairness_indicators/tutorial_utils/util_test.py @@ -21,8 +21,8 @@ import pandas as pd import tensorflow as tf -import tensorflow_model_analysis as tfma from google.protobuf import text_format +from tensorflow_model_analysis.proto import config_pb2 as tfma_config from fairness_indicators.tutorial_utils import util @@ -329,7 +329,7 @@ def test_get_eval_results_called_correclty( disabled_outputs{values: "analysis"} } """, - tfma.EvalConfig(), + tfma_config.EvalConfig(), ) mock_run_model_analysis.assert_called_once_with( diff --git a/fairness_indicators/version.py b/fairness_indicators/version.py index 0f30712..9f16838 100644 --- a/fairness_indicators/version.py +++ b/fairness_indicators/version.py @@ -14,4 +14,4 @@ """Contains the version string of Fairness Indicators.""" # Note that setup.py uses this version. -__version__ = "0.49.0.dev" +__version__ = "0.53.0.dev" diff --git a/pyproject.toml b/pyproject.toml index a862155..9f98d56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,3 +113,4 @@ ignore = [ addopts = "--import-mode=importlib" testpaths = ["fairness_indicators"] python_files = ["*_test.py"] +pythonpath = ["."] diff --git a/setup.py b/setup.py index d01b6b1..27a0120 100644 --- a/setup.py +++ b/setup.py @@ -20,8 +20,8 @@ import setuptools -if sys.version_info >= (3, 11): - sys.exit("Sorry, Python >= 3.11 is not supported") +if sys.version_info >= (3, 14): + sys.exit("Sorry, Python >= 3.14 is not supported") def select_constraint(default, nightly=None, git_master=None): @@ -38,12 +38,14 @@ def select_constraint(default, nightly=None, git_master=None): REQUIRED_PACKAGES = [ - "tensorflow>=2.17,<2.18", + "tensorflow>=2.21,<2.22", "tensorflow-hub>=0.16.1,<1.0.0", - "tensorflow-data-validation>=1.17.0,<2.0.0", - "tensorflow-model-analysis>=0.48.0,<0.49.0", + "tensorflow-data-validation>=1.21.0,<1.22.0", + "tensorflow-model-analysis>=0.52.0,<0.53.0", "witwidget>=1.4.4,<2", - "protobuf>=4.21.6,<6.0.0", + "protobuf>=6.0.0,<7.0.0", + "numpy>=1.23.5,<2.0.0; python_version < '3.13'", + "numpy>=2.1.0; python_version >= '3.13'", ] TEST_PACKAGES = [ @@ -73,7 +75,7 @@ def select_constraint(default, nightly=None, git_master=None): package_data={ "fairness_indicators": ["documentation/*"], }, - python_requires=">=3.9,<4", + python_requires=">=3.10,<4", install_requires=REQUIRED_PACKAGES, tests_require=REQUIRED_PACKAGES, extras_require={"docs": DOCS_PACKAGES, "test": TEST_PACKAGES, "dev": "pre-commit"}, @@ -86,7 +88,10 @@ def select_constraint(default, nightly=None, git_master=None): "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", diff --git a/tensorboard_plugin/pytest.ini b/tensorboard_plugin/pytest.ini index 61d2b34..a02cf33 100644 --- a/tensorboard_plugin/pytest.ini +++ b/tensorboard_plugin/pytest.ini @@ -2,3 +2,4 @@ addopts = "--import-mode=importlib" testpaths = "tensorboard_plugin_fairness_indicators" python_files = "*_test.py" +pythonpath = . diff --git a/tensorboard_plugin/setup.py b/tensorboard_plugin/setup.py index b19ef09..f61c847 100644 --- a/tensorboard_plugin/setup.py +++ b/tensorboard_plugin/setup.py @@ -19,8 +19,8 @@ from setuptools import find_packages, setup -if sys.version_info >= (3, 11): - sys.exit("Sorry, Python >= 3.11 is not supported") +if sys.version_info >= (3, 14): + sys.exit("Sorry, Python >= 3.14 is not supported") def select_constraint(default, nightly=None, git_master=None): @@ -37,12 +37,14 @@ def select_constraint(default, nightly=None, git_master=None): REQUIRED_PACKAGES = [ - "protobuf>=4.21.6,<6.0.0", - "tensorboard>=2.17.0,<2.18.0", - "tensorflow>=2.17,<2.18", - "tf-keras>=2.17,<2.18", - "tensorflow-model-analysis>=0.48,<0.49", + "protobuf>=6.0.0,<7.0.0", + "tensorboard>=2.21.0,<2.22.0", + "tensorflow>=2.21,<2.22", + "tf-keras>=2.21,<2.22", + "tensorflow-model-analysis>=0.52,<0.53", "werkzeug<2", + "numpy>=1.23.5,<2.0.0; python_version < '3.13'", + "numpy>=2.1.0; python_version >= '3.13'", ] TEST_PACKAGES = [ @@ -76,7 +78,7 @@ def select_constraint(default, nightly=None, git_master=None): "fairness_indicators = tensorboard_plugin_fairness_indicators.plugin:FairnessIndicatorsPlugin", ], }, - python_requires=">=3.9,<4", + python_requires=">=3.10,<4", install_requires=REQUIRED_PACKAGES, tests_require=REQUIRED_PACKAGES, extras_require={ @@ -90,7 +92,10 @@ def select_constraint(default, nightly=None, git_master=None): "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", diff --git a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/RELEASE.md b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/RELEASE.md index c47cc78..6d53fa3 100644 --- a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/RELEASE.md +++ b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/RELEASE.md @@ -10,6 +10,29 @@ ## Deprecations +# Version 0.52.0 + +## Major Features and Improvements + +* N/A + +## Bug Fixes and Other Changes + +* Support `tensorflow>=2.21,<2.22` and `tf-keras>=2.21,<2.22`. +* Depends on `tensorboard>=2.21.0,<2.22.0`. +* Depends on `tensorflow-model-analysis>=0.52.0,<0.53.0`. +* Depends on `protobuf>=6.0.0,<7.0.0`. +* Added conditional NumPy dependency (`numpy>=1.23.5,<2.0.0` for Python < 3.13 and `numpy>=2.1.0` for Python >= 3.13). +* Removed Python 3.9 support and added support for Python 3.10, 3.11, 3.12, and 3.13. + +## Breaking Changes + +* N/A + +## Deprecations + +* N/A + # Version 0.48.0 ## Major Features and Improvements diff --git a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py index d993580..ff5656c 100644 --- a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py +++ b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py @@ -30,6 +30,7 @@ plugin_event_multiplexer as event_multiplexer, ) from tensorboard.plugins import base_plugin +from tensorflow_model_analysis.proto import config_pb2 as tfma_config from tensorflow_model_analysis.utils import example_keras_model from werkzeug import test as werkzeug_test from werkzeug import wrappers @@ -116,7 +117,7 @@ def _make_eval_config(self): } } """, - tfma.EvalConfig(), + tfma_config.EvalConfig(), ) def testRoutes(self): diff --git a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/version.py b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/version.py index dde7818..0c8a741 100644 --- a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/version.py +++ b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/version.py @@ -15,4 +15,4 @@ """Contains the version string of Fairness Indicators Tensorboard Plugin.""" # Note that setup.py uses this version. -__version__ = "0.49.0.dev" +__version__ = "0.53.0.dev"