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

Fix PyBuffer serializer #340

Merged
merged 2 commits into from
Jan 14, 2022
Merged

Fix PyBuffer serializer #340

merged 2 commits into from
Jan 14, 2022

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jan 14, 2022

#322 silently broke the Protocol Buffer serializer (GetPyBuffer()). This PR fixes the serializer and also adds a testing coverage.

Error when calling GetPyBuffer():

>       return array(a, dtype, copy=False, order=order)
E       RuntimeError: Item size 268 for PEP 3118 buffer format string T{256s=f=f} does not match the dtype V item size 264.

which means that the format string was incorrect. #322 added a new field to ModelParam but did not update the corresponding format string.

@codecov
Copy link

codecov bot commented Jan 14, 2022

Codecov Report

Merging #340 (90db60d) into mainline (2a62c6f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             mainline     #340   +/-   ##
===========================================
  Coverage       84.93%   84.93%           
  Complexity         42       42           
===========================================
  Files             108      108           
  Lines            8461     8461           
  Branches          472      472           
===========================================
  Hits             7186     7186           
  Misses           1252     1252           
  Partials           23       23           
Impacted Files Coverage Δ
include/treelite/tree_impl.h 89.43% <100.00%> (ø)

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 2a62c6f...90db60d. Read the comment docs.

@hcho3 hcho3 merged commit e216212 into dmlc:mainline Jan 14, 2022
@hcho3 hcho3 deleted the fix_pybuffer_serializer branch January 14, 2022 20:57
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Jan 25, 2022
The 2.2.0 version of Treelite incorporates the following major improvements:

* dmlc/treelite#314
* dmlc/treelite#322, dmlc/treelite#327
* dmlc/treelite#325
* dmlc/treelite#332
* dmlc/treelite#330
* dmlc/treelite#333
* dmlc/treelite#334
* dmlc/treelite#304
* dmlc/treelite#335

In particular, dmlc/treelite#332, dmlc/treelite#330, dmlc/treelite#333 are required for #4447.

Requires rapidsai/integration#412.

EDIT. Using 2.2.1 patch release, to incorporate a hotfix (dmlc/treelite#340).

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #4484
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
The 2.2.0 version of Treelite incorporates the following major improvements:

* dmlc/treelite#314
* dmlc/treelite#322, dmlc/treelite#327
* dmlc/treelite#325
* dmlc/treelite#332
* dmlc/treelite#330
* dmlc/treelite#333
* dmlc/treelite#334
* dmlc/treelite#304
* dmlc/treelite#335

In particular, dmlc/treelite#332, dmlc/treelite#330, dmlc/treelite#333 are required for rapidsai#4447.

Requires rapidsai/integration#412.

EDIT. Using 2.2.1 patch release, to incorporate a hotfix (dmlc/treelite#340).

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4484
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.

1 participant