-
Notifications
You must be signed in to change notification settings - Fork 12
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
replace @distributed with pmap #54
Comments
@OkonSamuel Thanks for that explantation. It's good we are tracking this kind of issue. It sounds like we might want to wait for the cited issues to be resolved before making any changes here, right? |
Or are you saying we could safely implement the workaround (under the hood - the user doesn't need to do anything)? |
Yes. With the only caveat being we won't be able to use processes from within threads. |
@ablaom. You may not like this. But i would suggest disabling the option of nesting |
No, no, that's sound like a reasonable suggestion, especially if you are happy to make the PR's 😄 There could be some tedium around updating the tests, which presently cycle through all possible combinations. |
Currently in MLJ acceleration with
CPUThreads
is implemented using@distributed
. This effectively splits up the given range (1:nfolds
or1:nmetamodels
) into equal chunks and sends them off to all workers loaded withaddprocs
. This is great if the each chunk runs in the same amount of time otherwise some overhead is experienced. Also the user lacks the ability to specify the actual workers to be used in computing. (This might not be a big deal)pmap
implementation allows user more control (if they wish) in how these tasks are sent to to these workers.(this is due tobatch_size
andAbstractWorkerPool
options it exposes).Previously the main reason for not adopting
pmap
was because nestedpmap
hangs see JuliaLang/Distributed.jl#62 (There is a workaround this stated there).The only limitation left in adopting this is that calling
pmap
from withinThreads.@spawn
some times hangs.( Although i don't think it is practical to callpmap
from threads. What is more common is calling threads from processes) see JuliaLang/Distributed.jl#69The text was updated successfully, but these errors were encountered: