-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pass .chunk/rechunk calls through for chunked arrays without ChunkManagers #9286
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
Open
TomNicholas
wants to merge
34
commits into
pydata:main
Choose a base branch
from
TomNicholas:non_registered_chunkedarrays
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
f860ce5
test that rechunk can be passed through non registered chunked arrays
TomNicholas 77947c3
remove chunks and rechunk from chunkmanager
TomNicholas da6799a
remove now-redundant chunks method from dask chunkmanager
TomNicholas 34dadae
use is_chunked_array instead of hasattr(chunks)
TomNicholas 6e26a2d
add has_chunkmanager function
TomNicholas 78e8ff4
use has_chunkmanager
TomNicholas 6feede3
fix errors in other tests
TomNicholas 621ea0c
improve docs
TomNicholas c305b61
test that computation proceeds without dask on unregistered chunked a…
TomNicholas 4f82d9d
type hinting fixes
TomNicholas a9bd35d
fix other issues revealed by typing
TomNicholas 49e2b5f
Merge branch 'main' into non_registered_chunkedarrays
TomNicholas a24489b
ensure tests check that chunks are properly normalized
TomNicholas 2cce6a0
remove now-redundant chunks and rechunk methods from DummyChunkManager
TomNicholas 3cadd53
commented-out code indicating problem with chunk normalization
TomNicholas 556161d
fixed bug with chunks passed as dict
TomNicholas 0296f92
fix dodgy chunking patterns in tests
TomNicholas 9c2ab5e
Revert "fixed bug with chunks passed as dict"
TomNicholas 665727b
fixed bug with chunks passed as dict
TomNicholas 54adae7
remove outdated comments
TomNicholas 5863859
Merge branch 'main' into non_registered_chunkedarrays
TomNicholas b1024c9
refactor to always use the same codepath for chunk normalization
TomNicholas e926748
also use new codepath when determining preferred_chunks for backends
TomNicholas def3131
update TODO about what normalization is handled by dask
TomNicholas 8db961e
remove normalize_chunks method from ChunkManagerEntrypoint
TomNicholas 955c56e
vendor dask.array.normalize_chunks and its dependencies
TomNicholas 58d1cc1
Merge branch 'main' into non_registered_chunkedarrays
TomNicholas aa3afff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] bd29f79
use Union for python <3.10
TomNicholas 7ad5f07
some pre-commit fixes
TomNicholas d14b705
add __init__.py's to avoid import problems
TomNicholas aac1566
add vendor/__init__.py
TomNicholas a0d1e84
try to shut mypy up
TomNicholas ce1df3a
Merge branch 'main' into non_registered_chunkedarrays
dcherian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This
is_chunked_array(arr) and has_chunkmanager(arr)
pattern becomes necessary because we are now considering the possibility thatis_chunked_array(arr) == True
buthas_chunkmanager(arr) == False
, whereas previously these were assumed to always be consistent.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.
@headtr1ck I got a notification saying you commented saying
(But I can't find your comment.)
It's a good question though. I think there are some array types that don't define a
.chunks
where you might still want to use otherChunkManager
methods.In particular JAX is interesting - it has a top-level
pmap
function which applies a function over multiple axes of an array similar toapply_gufunc
. It distributes computation, but not over.chunks
(which JAX doesn't define), instead over a global variablejax.local_device_count
.This is why I think we should rename
ChunkManager
toComputeManager
.cc @alxmrs
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 came to the same conclusion, that's why I deleted the comment, sry.
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.
No worries! I prefer to leave all my half-baked thoughts in the open and double or triple-post 😅 If you were wondering it then other people will definitely have the same question!
I could leave this to a second PR, to isolate the breaking changes.
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.
@TomNicholas FYI JAX does now support something a bit like chunking via sharding of
jax.Array
, there's a good summary here: https://jax.readthedocs.io/en/latest/notebooks/Distributed_arrays_and_automatic_parallelization.htmlIIUC this is now preferred over
pmap
.