-
Notifications
You must be signed in to change notification settings - Fork 84
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
Remove process dask array #827
Remove process dask array #827
Conversation
…rect beam and replaced it with `map`
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.
I agree with the changes! Much more streamlined code.
I don't have the time to check the functionality, but if the unit tests still pass, it should be ok.
@CSSFrancis, maybe do a simple runtime check with a dataset, and see if the computation time is the same for both the current version of hyperspy_release_next_minor
, and your pull request.
@@ -862,7 +862,7 @@ def test_non_uniform_chunks(self): | |||
def test_return_shifts_non_lazy(self): | |||
s = self.s | |||
s_shifts = s.center_direct_beam(method="blur", sigma=1, return_shifts=True) | |||
assert s_shifts._lazy is False | |||
assert s_shifts._lazy is True |
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.
Why this change? I'm thinking a non-lazy input should return a non-lazy output?
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.
Yes that is probably what should happen. I didn't look that over too well I'll make that change back.
I tested this using 8 cores on a cluster and: Alignment of a 128x128x256x256 dataset using the map method takes:
And using
So the new method is marginally slower which is to be expected considering the extra overhead for the I also did a test on my local computer '''python import numpy as np s.center_direct_beam(method='blur', sigma=1)``` New: On another note I think that this solves whatever the problem I was having with #782 as I can now use dask-distributed to center and save a 1028x1028x256x256 dataset with 8 cores and only around 10-20 Gb of RAM compared to previously when it would take upwards of 100 Gb. |
…t_direct_beam_position` Removed commented code
a3177ec
to
ad6a78d
Compare
Looks good, there are some possible optimizations in |
I checked this, and the things which I thought would improve the runtime, did not work. So I won't make the aforementioned "optimization" pull request. |
name: Remove process dask array
about: This removes all instances of
process_dask_array
and replaces them withmap
instead for more constancy throughout the code.Checklist
@magnunor Do you see any reason against doing this?