Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
push:
branches:
- master
- r*
tags:
- '*'
pull_request:
branches:
- master
- r*
release:
types: [published]
workflow_dispatch:

jobs:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 23 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion fairness_indicators/example_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -113,7 +114,7 @@ def test_example_model(self):
}
}
""",
tfma.EvalConfig(),
tfma_config.EvalConfig(),
)

validate_tf_file_path = self._write_tf_records(data)
Expand Down
3 changes: 2 additions & 1 deletion fairness_indicators/tutorial_utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions fairness_indicators/tutorial_utils/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion fairness_indicators/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ ignore = [
addopts = "--import-mode=importlib"
testpaths = ["fairness_indicators"]
python_files = ["*_test.py"]
pythonpath = ["."]
21 changes: 13 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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 = [
Expand Down Expand Up @@ -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"},
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tensorboard_plugin/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
addopts = "--import-mode=importlib"
testpaths = "tensorboard_plugin_fairness_indicators"
python_files = "*_test.py"
pythonpath = .
23 changes: 14 additions & 9 deletions tensorboard_plugin/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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 = [
Expand Down Expand Up @@ -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={
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -116,7 +117,7 @@ def _make_eval_config(self):
}
}
""",
tfma.EvalConfig(),
tfma_config.EvalConfig(),
)

def testRoutes(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading