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

Refactor executors again #112

Merged
merged 16 commits into from
Mar 23, 2022

Conversation

rabernat
Copy link
Member

@rabernat rabernat commented Mar 16, 2022

This was a little coding project while stuck in a plane for a few hours. Here I am basically just copying over pangeo-forge-recipes' latest executors, which we spent a lot of time optimizing.

Locally I have pywren tests failing with a message TypeError: cannot pickle 'weakref' object. Was not able to debug this quickly as I'm not too familiar with pywren.

@tomwhite
Copy link
Collaborator

Locally I have pywren tests failing

There has not been a pywren release for over 3 years, since it has now become lithops. I wonder if we should remove or disable the pywren executor for this reason.

@rabernat rabernat marked this pull request as ready for review March 22, 2022 19:38
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #112 (ac9737f) into master (0a0d1eb) will decrease coverage by 0.48%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
- Coverage   96.81%   96.32%   -0.49%     
==========================================
  Files          12       11       -1     
  Lines         534      490      -44     
  Branches      121      112       -9     
==========================================
- Hits          517      472      -45     
  Misses         11       11              
- Partials        6        7       +1     
Impacted Files Coverage Δ
rechunker/executors/dask.py 100.00% <100.00%> (+5.45%) ⬆️
rechunker/executors/prefect.py 100.00% <100.00%> (ø)
rechunker/executors/python.py 100.00% <100.00%> (ø)
rechunker/pipeline.py 100.00% <100.00%> (ø)
rechunker/types.py 100.00% <100.00%> (ø)
rechunker/api.py 98.04% <0.00%> (-1.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a0d1eb...ac9737f. Read the comment docs.

@rabernat
Copy link
Member Author

Ok so in fb8b1ee I just removed the pywren executor. If it is unmaintained, it's not feasible for us to find workarounds to keep supporting it. @tomwhite - are you using the pywren executor these days?

I had a look at lithops, and it looks like it should be pretty straightforward to support. It would be nice to have a serverless option. If someone wants to implement and maintain a lithops executor, I would be happy to support that effort.

a_tar = dsa.from_zarr(target_array)
assert dsa.equal(a_tar, 1).all().compute()
a_tar = np.asarray(result)
print(a_tar.shape, a_tar.dtype)
Copy link
Member

Choose a reason for hiding this comment

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

(nitpick): left a debug print here. And can / should the assert below be uncommented?

"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",

)

from mypy_extensions import NamedArg
Copy link
Member

Choose a reason for hiding this comment

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

Is this a necessary runtime dependency? Might need to add it to install_requires in the setup.py / setup.cfg.

Copy link
Member

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

LGTM, other than the need to update the deps for mypy-extensions (if it is indeed necessary).

@tomwhite
Copy link
Collaborator

@tomwhite - are you using the pywren executor these days?

No, I'm not.

@rabernat
Copy link
Member Author

For some reason the test workflow is not running.

@TomAugspurger
Copy link
Member

GitHub actions was having issues earlier, but nothing is reported at https://www.githubstatus.com/ at the moment.

@TomAugspurger
Copy link
Member

Oh, https://github.com/pangeo-data/rechunker/actions/runs/2029808478 shows

The workflow is not valid. .github/workflows/ci.yaml (Line: 9, Col: 7): Unexpected value 'fast-fail'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot use rechunker starting from 0.4.0 Rechunker 0.3.3 is incompatible with Dask 2022.01.1 and later
3 participants