Using joblib to parallelize plotting
See original GitHub issueI realize there’s another issue about the same functionality using dask, but apparently there are some glitches that haven’t been easy to resolve. There were talks about dask’s map_blocks
but nothing got implemented. Today I came across an alternative by @ali-ramadhan, which is joblib, which might be worth considering.
You can see it being used in this script, and apparently the only “trick” needed here was to load the dataset in the function is that he “needed to open the dataset inside the function called by joblib”. Other than that I think all that was needed was the addition of one joblib call in line 127: https://github.com/CliMA/Oceananigans.jl/blob/7a2c52442b780222e6700f5a99e3be24c4de909d/validation/lid_driven_cavity/plot_lid_driven_cavity.py#L127
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top GitHub Comments
I started both this issue and PR #35, and I completely agree that this is about to be made obsolete! I started this before opening #35 just to discuss and see what the best way to implement was.
My vote is that you can close this whenever you feel appropriate.
Hey folks, thanks for the suggestion. I in fact implemented
dask.delayed
in my initial approach summarized here, and the speedup was very nice. I am very keen on the implementation in #35, since I thinkmap_blocks
seems like a great way to implement this in a general way. But I will definitely keep this in mind until we find a good solution to this important problem.