Skip to content

Catch alternate exception type in NumpyBatchConverter - #40553

Merged
shunping merged 1 commit into
apache:masterfrom
jrmccluskey:numpyBatchConverterFix
Oct 13, 2026
Merged

shunping merged 1 commit into
apache:masterfrom
jrmccluskey:numpyBatchConverterFix

Conversation

@jrmccluskey

Copy link
Copy Markdown
Contributor

NumPy 2.4.6+ can raise a ValueError instead of a TypeError when handed a dtype it cannot convert, leading to breakages when exercising this code (caught with local runs against the pytorch_type_compatibility_test.py suite.) Catching both and raising as the expected TypeError maintains the expected behavior within Beam.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @shunping for label python.
Backup reviewer: claudevdm (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.74%. Comparing base (76f6e6d) to head (458cd98).
⚠️ Report is 156 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #40553       +/-   ##
=============================================
+ Coverage     56.16%   79.74%   +23.57%     
=============================================
  Files          1124      487      -637     
  Lines        178336    82282    -96054     
  Branches       1489        0     -1489     
=============================================
- Hits         100170    65612    -34558     
+ Misses        75645    16670    -58975     
+ Partials       2521        0     -2521     
Flag Coverage Δ
go ?
java ?
python 79.74% <100.00%> (+0.18%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shunping shunping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@shunping
shunping merged commit 3636a23 into apache:master Oct 13, 2026
88 of 89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants