Skip to content
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

Fix memory issue in EBSD refinement due to naive use of dask #470

Merged
merged 11 commits into from
Nov 17, 2021

Conversation

hakonanes
Copy link
Member

Description of the change

Fix #468.

I consider this a patch, although a few minor API changes are made:

  • EBSD refinement methods accept two optional parameters rechunk, for whether to allow rechunking of pattern array for refinement (which is not the in-place array) and chunk_kwargs, to control the chunk size if rechunk=True.
  • When compute=False is passed, EBSD refinement methods return a dask array instead of a list of dask delayed instances. The kikuchipy.indexing.compute_refine_orientation_results() and similar functions accept this array instead of the list.

There is one new issue: the dask array returned when not computing results right away doesn't have the correct shape in its representation, but it produces an array with the correct shape when computed... I'm not sure how to fix this, but decided that it's a too small thing to hold up this patch release.

A 0.5.4 release will be automatically prepared when this PR is merged. I plan to release this on the coming Wednesday.

Progress of the PR

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • New contributors are added to .all-contributorsrc and the table is regenerated.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the bug Something isn't working label Nov 15, 2021
@hakonanes hakonanes added this to the v0.5.4 milestone Nov 15, 2021
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes
Copy link
Member Author

I'll merge tomorrow and then release v0.5.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant