Skip to content

[MRG] MNT Fix memory leak in KMeans#17000

Merged
jnothman merged 1 commit intoscikit-learn:masterfrom
jeremiedbb:fix-elkan-memory-leak
Apr 22, 2020
Merged

[MRG] MNT Fix memory leak in KMeans#17000
jnothman merged 1 commit intoscikit-learn:masterfrom
jeremiedbb:fix-elkan-memory-leak

Conversation

@jeremiedbb
Copy link
Copy Markdown
Member

Fixes #16991

elkan algorithm used to not free it's temporary allocated arrays.

@jeremiedbb jeremiedbb added this to the 0.23 milestone Apr 22, 2020
@jnothman
Copy link
Copy Markdown
Member

Have you checked this is all?

@jeremiedbb
Copy link
Copy Markdown
Member Author

Using the script in the bug report, there's no memory increase any more.
I double checked that every m(c)alloc has comes with a free both for lloyd and elkan.

Copy link
Copy Markdown
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Thanks @jeremiedbb

@jnothman jnothman merged commit 1523f39 into scikit-learn:master Apr 22, 2020
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory leak in k_means for 0.23.dev0

3 participants