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

Implement option to use dask to do image co-addition #388

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions reproject/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

@delayed(pure=True)
def as_delayed_memmap_path(array, tmp_dir):
tmp_dir = tempfile.mkdtemp() # FIXME
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why I didn't catch this before but I ran into an issue where the temporary directory no longer exists by the time the array is computed out of dask when using return_type='dask'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes - are you saying that is a problem with the current implementation, or this line is fixing it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary fix for this PR but I need to figure out a proper solution. It is a problem in main.

if isinstance(array, da.core.Array):
array_path, _ = _dask_to_numpy_memmap(array, tmp_dir)
else:
Expand Down
Loading