Skip to content

Improve documentation of block_info keyword argument in Dask array map_blocks #8342

Closed

Description

@GenevieveBuckley

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.

Activity

  1. added
    good first issue
    documentation
    on Nov 4, 2021
  2. GenevieveBuckley commented on Nov 4, 2021

    @GenevieveBuckley
    ContributorAuthor

    This would be a good first issue. If anyone wants to give it a go, that'd be great 😄

  3. GenevieveBuckley commented on Nov 29, 2021

    @GenevieveBuckley
    ContributorAuthor

    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.

  4. phobson commented on Mar 16, 2022

    @phobson
    Contributor

    I believe this was closed by #8425

  5. GenevieveBuckley commented on Mar 18, 2022

    @GenevieveBuckley
    ContributorAuthor

    You're right, good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraydocumentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions