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

copy predicted array so we dont overwrite used memory location #188

Merged
merged 3 commits into from
Aug 7, 2023

Conversation

ExpandingMan
Copy link
Collaborator

This fixes #187

@ExpandingMan
Copy link
Collaborator Author

I guess in some perverse way this could technically be considered breaking as this behavior is a sort of "feature" of libxgboost, but it seems safe to say that the behavior on currnet main would be bewildering to the vast majority of users and should definitely not be the default for this wrapper.

@ExpandingMan
Copy link
Collaborator Author

I have added the function predict_nocopy for users who can't bear the extra allocation.

Also, instead of doing transpose we now use permutedims on the output, which is what should have been happening in the first place.

@ExpandingMan ExpandingMan merged commit 02e1249 into dmlc:master Aug 7, 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.

predict overwrites previously returned predictions
1 participant