Ignore kmeans memory leak warning on Windows#100
Merged
Conversation
…s when running on Windows machines.
kennedy-mindermann
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When running on Windows,
WriteHintage.pyprints the memory leak warning below 249 times in a USA_defaults case. This pull request suppressing that warning to give a cleaner log file on Windows. The warning says you can setOMP_NUM_THREADS=1, but given this is Windows only, I opted to not go that route so that we don't unintentionally impact performance on other systems, and because I've never seen any issues with a memory leak in the many years that we have been using this version of the kmeans function.Validation, testing, and comparison report(s)
I reran
WriteHintage.pyon Windows and verified that the error/warning is no longer printed to the log file.Checklist for author
Details to double-check
[ ] Included comparison reports for appropriate test cases[ ] Documentation updated if necessaryGeneral information to guide review
Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how
Yes, I used an LLM to figure out how to suppress the warning message.