Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlatMap numpy array bug #22006

Merged
merged 2 commits into from
Jun 23, 2022
Merged

Conversation

TheNeuralBit
Copy link
Member

@TheNeuralBit TheNeuralBit commented Jun 22, 2022

Fixes #22000

0de9821 introduced a regression when a FlatMap produced an instance of an iterable type that raises an error in __bool__, like numpy arrays. The regression was just caused by a trivial cleanup, which is reverted here.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@TheNeuralBit
Copy link
Member Author

R: @tvalentyn @robertwb
CC: @pabloem (I would like to cherrypick this, sorry!)

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #22006 (19f0c2e) into master (1dff59b) will decrease coverage by 0.14%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master   #22006      +/-   ##
==========================================
- Coverage   74.12%   73.97%   -0.15%     
==========================================
  Files         702      702              
  Lines       93667    92850     -817     
==========================================
- Hits        69431    68689     -742     
+ Misses      22981    22906      -75     
  Partials     1255     1255              
Flag Coverage Δ
python 83.58% <75.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdks/python/apache_beam/runners/common.py 88.59% <75.00%> (-0.10%) ⬇️
sdks/python/apache_beam/utils/interactive_utils.py 95.12% <0.00%> (-2.44%) ⬇️
sdks/python/apache_beam/transforms/core.py 92.57% <0.00%> (-1.72%) ⬇️
...thon/apache_beam/ml/inference/sklearn_inference.py 95.23% <0.00%> (-1.58%) ⬇️
...cp/internal/clients/bigquery/bigquery_v2_client.py 66.82% <0.00%> (-0.97%) ⬇️
sdks/python/apache_beam/transforms/combiners.py 93.05% <0.00%> (-0.39%) ⬇️
sdks/python/apache_beam/ml/inference/base.py 95.37% <0.00%> (-0.38%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.42% <0.00%> (-0.25%) ⬇️
sdks/python/apache_beam/ml/inference/__init__.py 100.00% <0.00%> (ø)
...thon/apache_beam/ml/inference/pytorch_inference.py 0.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dff59b...19f0c2e. Read the comment docs.

@pabloem
Copy link
Member

pabloem commented Jun 22, 2022

LGTM! I suppose you can merge or wait for other reviewers but fix makes sense to me.

@TheNeuralBit
Copy link
Member Author

Thanks, I'm fine merging with your LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Possible regression in 0de98210f .
2 participants