You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve documentation of block_info keyword argument in Dask array map_blocks #8342
I'd like us to add some extra information to the dask docs around the block_info keyword argument for Dask array map_blocks. I think it should be added to this section here
Marvin explained something I found confusing here VolkerH/DaskFusion#1 (comment). In bold is the important information I'd like us to add to the Dask docs.
tbh one thing I don't fully understand is why the block_info dictionary at the time of compute has keys for 0 and None. As far as I can tell, the content is duplicated. It might not matter all that much, part of the reason I still don't understand it is that I stopped looking at it once I had something that solved my problem. Also, I think the block_info part of the code was written fairly early on and may not have been changed or refined much after that, since it's a relatively underused part of the code base.
Was wondering about that too at first and then figured out that block_info[0] contains info about the input chunks and block_info[None] about the output chunks. This can be super useful when the chunk shape is changed by map_blocks.
Ooooh, ok!
That's very useful to know. I'm gonna open up an issue and try to get that clarification added to the Dask docs. No wonder I never figured it out, all of my test examples generally use the same input & output chunksize.
Upon closer inspection, the documentation does describe this, just in a way I found confusing. So it's really due to poor reading comprehension on my end.
I'm going to have a think about if there's a way to make the documentation clearer, otherwise I'll close this issue today or tomorrow.
Activity
GenevieveBuckley commentedon Nov 4, 2021
This would be a good first issue. If anyone wants to give it a go, that'd be great 😄
GenevieveBuckley commentedon Nov 29, 2021
Upon closer inspection, the documentation does describe this, just in a way I found confusing. So it's really due to poor reading comprehension on my end.
I'm going to have a think about if there's a way to make the documentation clearer, otherwise I'll close this issue today or tomorrow.
phobson commentedon Mar 16, 2022
I believe this was closed by #8425
GenevieveBuckley commentedon Mar 18, 2022
You're right, good catch!