-
Notifications
You must be signed in to change notification settings - Fork 45
FIX initialization build on kmedoids #91
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 initialization build on kmedoids #91
Conversation
If there is no remark, I will merge this to fix the bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TimotheeMathieu !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add a regression test to test this fix?
Noob question: what is a regression test ? |
It's a unit test that failed on master and that passes in this PR as a consequence of the underlying issue being fixed. To avoid this issue coming back in the future. For instance the example from the PR desciption would do. In this case, we can try to add it, but it kind of relies on the overall convergence behavior so it might not be very stable with future code changes. |
Ok, I will add a test with the same example but only the initialization because the fix is only on the build initialization and this is deterministic and should always return the same number. |
I sub-sampled to 500 to avoid long computational time. test on master gave inertia >= 250 and 2 unique labels. |
Is the failing documentation build related to this PR? It seems to be taking too long. |
I don't understand the failing documentation. |
If no one object, I will merge this PR as it has been approved. |
well, this PR is touching something on the circleci side, and one of those tests is failing, so we should figure that out before merging. One way to diagnose the issue is to replicate the environments locally, and see if some of the tests run with a different speed on different environments (since the error is a timeout) |
I tried to set up a docker image (docker image circleci/python:3.8) but for a reason or another my docker image does not has access to the internet so I didn't succeed in checking what is going on with circle ci, and I didn't succeed in installing the circleci cli tool meant to run cicleci locally (this tool is quite new from what I gathered). |
Thanks for continuing to work on this package @TimotheeMathieu !
yeah that tools is quite cumbersome to use last time I tried. With CircleCI the easiest is to click on "Restart Job with SSH" https://circleci.com/docs/2.0/ssh-access-jobs/ Then you need to activate the same conda env that's used for tests. Something like,
Here it looks like
Which is likely due to CPU oversubscription: something (likely BLAS, since scikit-learn should already handle this correctly I think) detects 32 CPU available, but only 2 we can actually used, leading to lots of unnecessary thread creation overhead. Setting OMP_NUM_THREADS to 2 should fix it. |
CI is green now, merging. Thanks! |
Fix typo in cython build initialization.
Answer to #90
Result :