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

DLQ support in RunInference #26261

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

damccorm
Copy link
Contributor

@damccorm damccorm commented Apr 13, 2023

Adds support for use_exception_handling in RunInference. We don't get this for free because use_exception_handling is a function on ParDo, not on PTransform (which is the superclass of RunInference)

Fixes #24209


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

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

@github-actions
Copy link
Contributor

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

R: @tvalentyn for label python.

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).

| 'BeamML_RunInference' >> run_inference_pardo)

def with_exception_handling(
self, *, exc_class=Exception, use_subprocess=False, threshold=1):
Copy link
Contributor

@AnandInguva AnandInguva Apr 13, 2023

Choose a reason for hiding this comment

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

nit: Do we want to provide main_tag and dead_letter_tag? since we already mentioned by default good tag and bad tag so not sure how useful it will be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally had it, but intentionally omitted it since those are primarily useful in the context of having >2 outputs

Copy link
Contributor

Choose a reason for hiding this comment

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

Sg

@damccorm
Copy link
Contributor Author

Run Python_Coverage PreCommit

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #26261 (bf535a5) into master (e0e1398) will increase coverage by 0.59%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #26261      +/-   ##
==========================================
+ Coverage   71.21%   71.81%   +0.59%     
==========================================
  Files         787      752      -35     
  Lines      103330   101386    -1944     
==========================================
- Hits        73588    72809     -779     
+ Misses      28246    27095    -1151     
+ Partials     1496     1482      -14     
Flag Coverage Δ
python 81.06% <100.00%> (+1.21%) ⬆️

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

Impacted Files Coverage Δ
sdks/python/apache_beam/io/textio.py 94.89% <ø> (ø)
sdks/python/setup.py 0.00% <ø> (ø)
sdks/python/apache_beam/ml/inference/base.py 96.28% <100.00%> (+0.16%) ⬆️

... and 48 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@damccorm damccorm merged commit b9f27f9 into apache:master Apr 14, 2023
@damccorm damccorm deleted the users/damccorm/runInferenceDLQ branch April 14, 2023 21:23
Args:
exc_class: An exception class, or tuple of exception classes, to catch.
Optional, defaults to 'Exception'.
use_subprocess: Whether to execute the DoFn logic in a subprocess. This
Copy link
Contributor

Choose a reason for hiding this comment

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

JFYI, use_subprocess currently has some known issues / limitations, which may surface here as well.

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.

[Task]: RunInference - send failures to dead letter queue
3 participants