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

feat: apply pep574 out-of-band pickling to DefaultContainer #3736

Merged
merged 4 commits into from
Apr 19, 2023

Conversation

larme
Copy link
Member

@larme larme commented Mar 31, 2023

What does this PR address?

This PR is an improvement of #3606 . Instead of using pickle5 to avoid memory copying of a single numpy ndarray, codes improved by this PR can avoid copying of any composite data structure (e.g. a list of ndarray) containing numpy ndarray or pandas dataframe.

Fixes #(issue)

Before submitting:

@larme larme requested a review from a team as a code owner March 31, 2023 01:33
@larme larme requested review from bojiang and removed request for a team March 31, 2023 01:33
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #3736 (537442f) into main (4a6d332) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3736   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        148     149    +1     
  Lines      12408   12447   +39     
=====================================
- Misses     12408   12447   +39     
Impacted Files Coverage Δ
src/bentoml/_internal/runner/container.py 0.00% <0.00%> (ø)
src/bentoml/_internal/utils/pickle.py 0.00% <0.00%> (ø)

aarnphm
aarnphm previously approved these changes Mar 31, 2023
@bojiang
Copy link
Member

bojiang commented Apr 4, 2023

Potential:

  • pandas DataFrame doing
  • binary file (need investigation, not now)
  • PIL.Image (not supported naturally)

@bojiang
Copy link
Member

bojiang commented Apr 4, 2023

Will continue to review after dataframe supported

@aarnphm
Copy link
Contributor

aarnphm commented Apr 12, 2023

@larme should we also mention here the performance cost for this?

@larme larme merged commit cc0c00c into bentoml:main Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants