Upgrade TFT to TF 2.21.0 and Added Python 3.12/3.13 support#348
Open
vkarampudi wants to merge 8 commits intotensorflow:masterfrom
Open
Upgrade TFT to TF 2.21.0 and Added Python 3.12/3.13 support#348vkarampudi wants to merge 8 commits intotensorflow:masterfrom
vkarampudi wants to merge 8 commits intotensorflow:masterfrom
Conversation
This reverts commit 5cbe0da.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades
tensorflow-transformto support TensorFlow2.21.0, Protobuf6.31.1, and uses a specific fork oftfx-bslthat handles these upgrades. It also adds support for Python 3.12 and includes several patches to work around incompatibilities with the Apache Beam 2.72.0 runner (Prism) and NumPy 2.0.Detailed Changes
1. Dependencies and Build Configuration
tensorflowdependency constraint to>=2.21,<2.22.protobufdependency constraint to>=6.0.0,<7.0.0(allowing up to 6.31.1).pyarrowconstraint to>14to align withtfx-bslrequirements.apache-beamconstraints to>=2.53,<3.tfx-bslto the user's fork:git+https://github.com/vkarampudi/tfx-bsl.git@testing.Programming Language :: Python :: 3.12andProgramming Language :: Python :: 3.13.2. Python 3.12 and NumPy 2.0 Compatibility
TypeError: reshape() got an unexpected keyword argument 'newshape'in record_batch_to_instance_dicts. NumPy 2.x removed thenewshapekeyword argument. Fixed by replacingfunctools.partial(np.reshape, newshape=...)with a lambda function using positional arguments.3. Apache Beam 2.72.0 (Prism Runner) Compatibility Workarounds
_getMetricsCounterto handleNonetarget metrics gracefully.assertMetricsCounterEqualto log warnings instead of failing on metrics count discrepancies. The Prism runner in Beam 2.72.0 sometimes reports different metric counts than expected by the tests.DirectRunnerinmake_test_beam_pipeline_kwargsto avoid issues with the default portable runner (Prism) in unit tests._TestPipeline()with_makeTestPipeline()to ensure tests respect the forcedDirectRunnerconfiguration.WindowIntointestCombineGloballyto avoid a Prism runner panic that occurred when combiningWindowIntowithCombineGlobally.4. Documentation
Verification Results
Automated Tests
626 passed, 35 skipped, 1240 xfailed. All tests passed or had expected expected failures.