Skip to content

Commit 5842bbc

Browse files
zoyahavtfx-copybara
authored andcommitted
Remove workaround for beam 2.40 not supporting FlatMap(builtin), and modify apache-beam[gcp] dependency to >=2.41.
PiperOrigin-RevId: 476083873
1 parent b2ede54 commit 5842bbc

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ other *untested* combinations may also work.
9696

9797
tensorflow-transform | apache-beam[gcp] | pyarrow | tensorflow | tensorflow-metadata | tfx-bsl |
9898
------------------------------------------------------------------------------- | -----------------| --------|-------------------|---------------------|---------|
99-
[GitHub master](https://github.com/tensorflow/transform/blob/master/RELEASE.md) | 2.40.0 | 6.0.0 | nightly (1.x/2.x) | 1.10.0 | 1.10.0 |
99+
[GitHub master](https://github.com/tensorflow/transform/blob/master/RELEASE.md) | 2.41.0 | 6.0.0 | nightly (1.x/2.x) | 1.10.0 | 1.10.0 |
100100
[1.10.0](https://github.com/tensorflow/transform/blob/v1.10.0/RELEASE.md) | 2.40.0 | 6.0.0 | 1.15.5 / 2.9 | 1.10.0 | 1.10.0 |
101101
[1.9.0](https://github.com/tensorflow/transform/blob/v1.9.0/RELEASE.md) | 2.38.0 | 5.0.0 | 1.15.5 / 2.9 | 1.9.0 | 1.9.0 |
102102
[1.8.0](https://github.com/tensorflow/transform/blob/v1.8.0/RELEASE.md) | 2.38.0 | 5.0.0 | 1.15.5 / 2.8 | 1.8.0 | 1.8.0 |

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
## Bug Fixes and Other Changes
1414

1515
* Depends on `tensorflow>=1.15.5,<2` or `tensorflow>=2.10,<2.11`
16+
* Depends on `apache-beam[gcp]>=2.41,<3`.
1617

1718
## Breaking Changes
1819

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ other *untested* combinations may also work.
9595

9696
tensorflow-transform | apache-beam[gcp] | pyarrow | tensorflow | tensorflow-metadata | tfx-bsl
9797
------------------------------------------------------------------------------- | ---------------- | ------- | ----------------- | ------------------- | -------
98-
[GitHub master](https://github.com/tensorflow/transform/blob/master/RELEASE.md) | 2.40.0 | 6.0.0 | nightly (1.x/2.x) | 1.10.0 | 1.10.0
98+
[GitHub master](https://github.com/tensorflow/transform/blob/master/RELEASE.md) | 2.41.0 | 6.0.0 | nightly (1.x/2.x) | 1.10.0 | 1.10.0
9999
[1.10.0](https://github.com/tensorflow/transform/blob/v1.10.0/RELEASE.md) | 2.40.0 | 6.0.0 | 1.15.5 / 2.9 | 1.10.0 | 1.10.0
100100
[1.9.0](https://github.com/tensorflow/transform/blob/v1.9.0/RELEASE.md) | 2.38.0 | 5.0.0 | 1.15.5 / 2.9 | 1.9.0 | 1.9.0
101101
[1.8.0](https://github.com/tensorflow/transform/blob/v1.8.0/RELEASE.md) | 2.38.0 | 5.0.0 | 1.15.5 / 2.8 | 1.8.0 | 1.8.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _make_required_install_packages():
4343
# protobuf) with TF and pyarrow version with tfx-bsl.
4444
return [
4545
'absl-py>=0.9,<2.0.0',
46-
'apache-beam[gcp]>=2.40,<3',
46+
'apache-beam[gcp]>=2.41,<3',
4747
'numpy>=1.16,<2',
4848
'protobuf>=3.13,<4',
4949
'pyarrow>=6,<7',

tensorflow_transform/beam/cached_impl_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,13 +1115,10 @@ def test_cached_ptransform_analyzer(self, use_tf_compat_v1):
11151115
class _AnalyzerMakeAccumulators(beam.PTransform):
11161116

11171117
def expand(self, pcoll):
1118-
# TODO(b/237367328): Use sum directly when beam>=2.40 allows it.
1119-
def _sum(x):
1120-
return sum(x)
11211118
input_sum = pcoll | beam.FlatMap(
1122-
_sum) | 'ReduceSum' >> beam.CombineGlobally(_sum)
1119+
sum) | 'ReduceSum' >> beam.CombineGlobally(sum)
11231120
size = pcoll | beam.Map(
1124-
np.size) | 'ReduceCount' >> beam.CombineGlobally(_sum)
1121+
np.size) | 'ReduceCount' >> beam.CombineGlobally(sum)
11251122

11261123
return (pcoll.pipeline
11271124
| beam.Create([None])

0 commit comments

Comments
 (0)