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 support for limiting number of models in memory #28263

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

damccorm
Copy link
Contributor

This will allow users to set an upper bound on the number of models in memory to help avoid OOMs. See https://docs.google.com/document/d/1kj3FyWRbJu1KhViX07Z0Gk0MU0842jhYRhI-DMhhcv4/edit#heading=h.iaih85l3wghw for more detail

Part of #27628


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 or the workflows README to see a list of phrases to trigger workflows.

@damccorm
Copy link
Contributor Author

Run Python_Coverage PreCommit

@damccorm
Copy link
Contributor Author

damccorm commented Aug 31, 2023

Looks like error in last precommit was due to low memory (and unrelated to current change). Should be solved by moving to GHA (in general, seems like GHA has been less flaky in my recent experience)

@damccorm damccorm marked this pull request as ready for review August 31, 2023 16:55
@damccorm
Copy link
Contributor Author

R: @riteshghorse

@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 Aug 31, 2023

Codecov Report

Merging #28263 (9258ddf) into master (205083d) will increase coverage by 0.08%.
Report is 18 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #28263      +/-   ##
==========================================
+ Coverage   72.28%   72.37%   +0.08%     
==========================================
  Files         678      679       +1     
  Lines       99899   100160     +261     
==========================================
+ Hits        72215    72488     +273     
+ Misses      26117    26105      -12     
  Partials     1567     1567              
Flag Coverage Δ
python 82.93% <100.00%> (+0.08%) ⬆️

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

Files Changed Coverage Δ
sdks/python/apache_beam/ml/inference/base.py 93.51% <100.00%> (+0.15%) ⬆️

... and 11 files with indirect coverage changes

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

Copy link
Contributor

@riteshghorse riteshghorse left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

sdks/python/apache_beam/ml/inference/base.py Show resolved Hide resolved
sdks/python/apache_beam/ml/inference/base.py Outdated Show resolved Hide resolved
@damccorm
Copy link
Contributor Author

Run Python PreCommit

@damccorm damccorm merged commit a472d1a into apache:master Aug 31, 2023
84 of 91 checks passed
@damccorm damccorm deleted the users/damccorm/models-per-worker branch August 31, 2023 21:16
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.

2 participants