[MRG] TST Fix slow test in pairwise.#13433
Conversation
jnothman
left a comment
There was a problem hiding this comment.
Will limiting memory to 1mb force this to be chunked?
|
I think we should be constructing the Parallel instance in
pairwise_distances_chunked
|
Yes, there was 77 chunks before, and 7 or 8 now. Timings for this test are now reduced to a few 100s ms. |
It could be but it wouldn't be that simple. However I don't think the purpose of |
|
Fair enough. I was thinking about passing in the Parallel instance to
pairwise_distances one way or another...
|
This reverts commit 5fcdf3d.
This reverts commit 5fcdf3d.
Fixes #13208
I've been able to reproduce locally so it was not a matter of distribution.
The issue was that with the previous working memory,
pairwise_distances_chunkedmade 77 chunks, leading to 77 calls to joblib parallel, re-creating the thread-pool each time. (I guess this is a situation where backend='loky' would be better but should not happen in practice)