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 an option to run Python operations in-line when invoked as a remote runner. #19266

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

robertwb
Copy link
Contributor

@robertwb robertwb commented Jun 3, 2022

This is useful in cases where a Python external transform is used
at construction, and then later the pipeline is run locally on the
Python runner.

Also removes an unnecessary warning as containers are now named
according to their Python version.


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Add a link to the appropriate issue in your description, if applicable. This will automatically link the pull request to the issue.
  • 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

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

…te runner.

This is useful in cases where a Python external transform is used
at construction, and then later the pipeline is run locally on the
Python runner.

Also removes an unnecessary warning as containers are now named
according to their Python version.
@github-actions github-actions bot added the python label Jun 3, 2022
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #19266 (4405056) into master (f24cedf) will decrease coverage by 0.02%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master   #19266      +/-   ##
==========================================
- Coverage   74.07%   74.04%   -0.03%     
==========================================
  Files         697      697              
  Lines       91927    91950      +23     
==========================================
- Hits        68092    68088       -4     
- Misses      22590    22617      +27     
  Partials     1245     1245              
Flag Coverage Δ
python 83.69% <42.85%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
sdks/python/apache_beam/transforms/environments.py 88.26% <ø> (-0.04%) ⬇️
...eam/runners/portability/fn_api_runner/fn_runner.py 87.51% <14.28%> (-2.50%) ⬇️
...ache_beam/runners/dataflow/dataflow_job_service.py 50.00% <60.00%> (-12.17%) ⬇️
...dks/python/apache_beam/options/pipeline_options.py 94.94% <100.00%> (+0.01%) ⬆️
...ache_beam/runners/portability/local_job_service.py 82.27% <100.00%> (+0.61%) ⬆️
sdks/python/apache_beam/internal/gcp/auth.py 73.33% <0.00%> (-5.34%) ⬇️
.../apache_beam/runners/interactive/dataproc/types.py 93.10% <0.00%> (-3.45%) ⬇️
sdks/python/apache_beam/utils/interactive_utils.py 95.12% <0.00%> (-2.44%) ⬇️
sdks/python/apache_beam/internal/dill_pickler.py 84.89% <0.00%> (-1.44%) ⬇️
...eam/runners/portability/fn_api_runner/execution.py 92.44% <0.00%> (-0.65%) ⬇️
... and 10 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 f24cedf...4405056. Read the comment docs.

@robertwb robertwb requested a review from damccorm June 3, 2022 23:51
@robertwb
Copy link
Contributor Author

robertwb commented Jun 3, 2022

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.

LGTM, just had one non-blocking question

})
def cancel(self):
if not self.is_terminal_state(self.state):
self.result.cancel()
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using this function anywhere/is there a reason to pull this out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robertwb
Copy link
Contributor Author

robertwb commented Jun 6, 2022

Thanks for the quick review!

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.

None yet

2 participants