Version 0.52.0
June 12, 2026 ยท View on GitHub
Major Features and Improvements
- Adds official support for Python 3.12 and 3.13.
- Drops support for Python 3.9.
- Depends on
tensorflow>=2.21.0,<2.22.0. - Depends on
protobuf>=6.31.1,<7.0.0. - Depends on
pyarrow>14. - Updates the minimum Bazel version required to build TFMA to 7.4.1.
Bug fixes and other Changes
- Pickling Stability Architecture:
- Refactored core test modules (
rouge_test.py,stats_test.py,model_util_test.py,confidence_intervals_util_test.py,metrics_plots_and_validations_evaluator_test.py) to use a new class-based matcher architecture. - Replaced nested closures with module-level classes (e.g.,
CheckResult,CheckResultMean) to ensure full serializability forPrismRunneron Python 3.13. - Removed
self(test instance) capture in Beam matchers to resolveRuntimeError: Unable to pickle fnduring distributed execution. - Enabled
--no_save_main_sessionfor all Beam pipelines in the test suite to prevent unintentional serialization of the main session and shared resources.
- Refactored core test modules (
- NumPy 2.0 & Python 3.13 Compatibility:
- Standardized on safe scalar extraction by replacing
float(ndarray)with.item()ormetric_util.safe_to_scalarin aggregation, attributions, calibration, flip metrics, and NDCG modules to resolveTypeErrorin Beam pipelines. - Fixed a batching bug in
flip_metrics.pyto correctly process all examples in a Beam batch. - Implemented robust, warning-free division in AUC, PR AUC, and confusion matrix calculations using
np.dividewithwhereclauses to preventRuntimeWarning. - Fixed
TypeErrorinpoisson_bootstrap.pyby removing redundant size argument frompoisson(1, 1)to return a scalar. - Implemented
kind='stable'sort inmetric_util.top_k_indicesfor deterministic tie-breaking.
- Standardized on safe scalar extraction by replacing
- Bug Fixes and Functional Corrections:
- Fixed a critical regression in
metric_util.pywhereSubKey(k=k)incorrectly selected the first prediction instead of the requested k-th largest prediction. - Fixed
UnparsedFlagAccessErrorinModelSignaturesDoFntests by removing directabsl.flagsaccess in pickling-sensitive contexts. - Removed obsolete
@unittest.expectedFailuredecorators from tests that are now passing in the stabilized environment. - Fixed various indentation and syntax errors in utility tests.
- Improved virtual environment relocation strategy to resolve Bazel sandbox access issues for
numpyand other C-extension headers. - Fixed
false_omission_rateinbinary_confusion_matrices.pyto return NaN when undefined, resolving proto mismatches inconfusion_matrix_plot_test.pyandscore_distribution_plot_test.py. - Fixed
NotFoundErrorinmodel_eval_lib_test.pyby ensuring temporary directories exist before writing files usingtf.io.gfile.makedirs. - Added missing
numpyimports in Beam-based modules to fixNameErrorregressions.
- Fixed a critical regression in
Breaking Changes
- Python 3.9 is no longer supported. The minimum supported Python version is now 3.10.
Deprecations
- N/A