-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
[Feature Request] implement MultiprocessingLauncher
#2187
Comments
I'd like to add that the current workaround (see discussion #2186) does not result in a prefect run isolation, but will require jobs to be paired, due to a limitation of |
Hi, what is the status of this FR? |
Hi @jbaczek, Deallocating pytorch CUDA memory is a compelling use-case, and this is an issue I've faced as well. I'm not sure if we'll have the bandwidth to implement this feature in time for Hydra 1.3. I'll add a tentative v1.3 milestone. If you have time to work on this, a PR would be welcome. |
Hi @Jasha10, I was experimenting with ProcessPoolExecutor during my work on above mentioned PR. You cant have purely multiprocessing launcher without any 3rd party dependencies because you need to pickle methods defined in main and lambdas. EDIT: after some experiments I think the best chance of doing this is using cloudpickle (used internally by joblib) and multiprocessing. Only issue is how to implement waiting for AsyncResults, but I have few ideas. Anyway is it ok with you to make hydra depend on cloudpickle? We can probably write this plugin by Monday (including integration with proposition from #2461) EDIT2: we are testing some solutions, are you interested? @Jasha10 |
Hi, I was experimenting with multiprocessing and it's capabilities and limits. Also with our implementation of it and found few issue you might like to know before considering adding it to core (or even plugins).
If you want to have some more details I can offer an online meeting. (you probably have my contacts in CLA :)) |
Hi @Zhylkaaa, Thanks for looking into this! I sincerely apologize for the delayed reply.
This is consistent with the solution used by several of Hydra's other launcher plugins.
To guarantee long-term stability, I think it's best for We can create a new folder under hydra's
Thanks! Unfortunately I don't have access to the CLA -- I suspect I'd need to go through Meta's legal department to get that :P |
We might consider implementing a launcher that employs Python's
multiprocessing
module (or some other simple mechanism from Python's standard library) for launching jobs in separate processes. This would be useful in multirun mode for the following reasons:BasicLauncher
, which runs jobs sequentially)BasicLauncher
, which runs all jobs in the same process).Concurrency and isolation are already possible via e.g. the Joblib launcher (as pointed out in discussion #2186) or the other advanced launchers (
RayLauncher
,SubititLauncher
,RQLauncher
). As I see it, the main advantages of aMultiprocessingLauncher
over something likeJoblibLauncher
would be (1) simplicity and (2) less reliance on third-party packages (joblib
).The text was updated successfully, but these errors were encountered: