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 method='blockwise' for Cubed #354

Closed
tomwhite opened this issue Apr 18, 2024 · 3 comments · Fixed by #357
Closed

Implement method='blockwise' for Cubed #354

tomwhite opened this issue Apr 18, 2024 · 3 comments · Fixed by #357

Comments

@tomwhite
Copy link
Contributor

No description provided.

@dcherian
Copy link
Collaborator

dcherian commented Apr 19, 2024

For context, the blocker here is some sort of internal support for variable chunking in Cubed? And presumably some rechunking to regular chunking will be needed at the end?

@tomwhite
Copy link
Contributor Author

For context, the blocker here is some sort of internal support for variable chunking in Cubed? And presumably some rechunking to regular chunking will be needed at the end?

Yes, that what I had been thinking. However, now I think it should be possible to choose the rechunk boundaries when resampling so that each output chunk has the same number of groups. For the example shown in https://flox.readthedocs.io/en/latest/implementation.html#method-blockwise, the output would have two groups per chunk, rather than (2, 2, 3, 1) groups in each chunk. (It's OK if the last chunk has fewer groups.) There is slightly more data transferred this way, but it avoids a final rechunk, which avoids a whole dataset copy, so I think it's worth a try.

@dcherian
Copy link
Collaborator

The other way to think of this then is that you want cohorts with equal sized cohorts (except for the last one)

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 a pull request may close this issue.

2 participants