-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add spatial slice parallelization tool #507
Add spatial slice parallelization tool #507
Conversation
7305442
to
c9e412f
Compare
c9e412f
to
e7b61e8
Compare
I believe this works as is, but we don't use it anywhere yet. More work is needed to get something like reproject working, since the parallelizer presently assumes the input and output cubes are the same shape. Smoothing should be easy to parallelize though... |
@astrofrog @e-koch want to give this a quick review? I think the concept is reasonably solid. I could use tips on how to reasonably test this... we probably want some performance tests to go along with the correctness tests. @astrofrog should this be booted in favor of dasktropyarrayquantity magic? |
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.
The parallel framework looks good to me. Apart from the tests, we also need some way to update the mask. Can we use a LazyMask
on the memmap file?
For the tests, is specifying parallel=True
with one core enough to test the joblib parts? The unfortunate part is that we probably need each of these methods tested with and without parallelizing.
What did you have in mind for performance tests?
I don't have a clear plan for performance tests. What are you thinking about in terms of modifying the mask? I don't think we necessarily need any way to update the mask on the fly within the parallelized loop. We can just update it after the fact. No? |
I agree with updating the mask after the operation. Much simpler. I can't remember if there was a specific operation that I thought would require updating the mask within the loop. |
By default, I don't think we should do anything to the mask, then. We should leave it to the user (or the specific operation) to update the mask after running |
Alright. It's probably worth showing the mask updating step in one of the examples, then. How about converting |
Good idea. Next time I have a few hours to put into this, I'll do it. |
…nto spatial_parallelization
to completely exclude these functions from VaryingResolutionSpectralCubes, since you might want to apply stuff along the spectral axis even if the resolution varies (though... probably not if they vary more than a given threshold, so we should raise warnings).
needed for _spatial
Since the kernel changes with slice in |
@e-koch the smooth tests now actually test this. I think it's good to merge? |
LGTM! |
This depends on #506. It splits out the parallelization stuff, and the memory mapped application, into spatial and spectral components