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

Add WatchFilePattern #25393

Merged
merged 17 commits into from
Feb 13, 2023
Merged

Add WatchFilePattern #25393

merged 17 commits into from
Feb 13, 2023

Conversation

AnandInguva
Copy link
Contributor

@AnandInguva AnandInguva commented Feb 9, 2023

WatchFilePattern Ptransform.

Completes Part 2 of #24042


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.

@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #25393 (f97fca2) into master (9b77bf9) will decrease coverage by 0.07%.
The diff coverage is 32.72%.

@@            Coverage Diff             @@
##           master   #25393      +/-   ##
==========================================
- Coverage   72.87%   72.81%   -0.07%     
==========================================
  Files         750      751       +1     
  Lines       99471    99611     +140     
==========================================
+ Hits        72494    72534      +40     
- Misses      25608    25708     +100     
  Partials     1369     1369              
Flag Coverage Δ
python 82.17% <32.72%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
...e/pytorch_image_classification_with_side_inputs.py 0.00% <0.00%> (ø)
sdks/python/apache_beam/ml/inference/utils.py 92.15% <89.74%> (-7.85%) ⬇️
sdks/python/apache_beam/io/fileio.py 96.11% <100.00%> (+0.01%) ⬆️
...python/apache_beam/runners/worker/worker_status.py 74.66% <0.00%> (-0.67%) ⬇️
...eam/runners/interactive/interactive_environment.py 91.71% <0.00%> (-0.31%) ⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py 89.24% <0.00%> (ø)
...thon/apache_beam/ml/inference/pytorch_inference.py 0.00% <0.00%> (ø)
...hon/apache_beam/runners/worker/bundle_processor.py 93.86% <0.00%> (+0.12%) ⬆️
...on/apache_beam/runners/dataflow/dataflow_runner.py 81.88% <0.00%> (+0.14%) ⬆️
...eam/runners/portability/fn_api_runner/execution.py 93.13% <0.00%> (+0.63%) ⬆️

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

@AnandInguva
Copy link
Contributor Author

Run PythonLint PreCommit

@AnandInguva AnandInguva marked this pull request as ready for review February 9, 2023 15:29
@AnandInguva
Copy link
Contributor Author

R : @damccorm

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

This looks great - had some comments, but they're all minor or total nits. Thanks!

Comment on lines +179 to +180
side_input = pipeline | WatchFilePattern(
interval=known_args.interval, file_pattern=known_args.file_pattern)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is awesome, just 2 lines and an additional arg to RunInference to do this!

sdks/python/apache_beam/ml/inference/utils.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/ml/inference/utils.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/ml/inference/utils.py Show resolved Hide resolved
sdks/python/apache_beam/ml/inference/utils_test.py Outdated Show resolved Hide resolved
@AnandInguva
Copy link
Contributor Author

TODO to myself: Change the typo after #25399 is merged

@AnandInguva AnandInguva requested a review from damccorm February 9, 2023 18:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

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

R: @jrmccluskey for label python.
R: @ahmedabu98 for label io.

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

@damccorm
Copy link
Contributor

damccorm commented Feb 9, 2023

TODO to myself: Change the typo after #25399 is merged

Merged - sorry for the delay, had to retry some precommit checks

@AnandInguva
Copy link
Contributor Author

Run PythonDocs PreCommit

@AnandInguva
Copy link
Contributor Author

Run Whitespace PreCommit

@AnandInguva
Copy link
Contributor Author

I addressed almost all comments. PTAL @damccorm . Thanks for the suggestions

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Just one last small typo

AnandInguva and others added 2 commits February 10, 2023 16:11
…ification_with_side_inputs.py

Co-authored-by: Danny McCormick <dannymccormick@google.com>
@damccorm damccorm merged commit bb5e200 into apache:master Feb 13, 2023
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