Skip to content

Add blocksize to task name#6818

Merged
mrocklin merged 4 commits intodask:masterfrom
jsignell:blocksize-in-name
Nov 12, 2020
Merged

Add blocksize to task name#6818
mrocklin merged 4 commits intodask:masterfrom
jsignell:blocksize-in-name

Conversation

@jsignell
Copy link
Copy Markdown
Member

@jsignell jsignell commented Nov 9, 2020

  • Tests added / passed
  • Passes black dask / flake8 dask

Closes #6814

I am still thinking about how to add tests. I think this only happens on a distributed cluster.

@nils-braun
Copy link
Copy Markdown
Contributor

Thank you @jsignell for looking into it!

reader, blocks, header, head, kwargs, blocksize="30B"
)
value_names = {key[0] for key in values.dask.keys()}
assert value_names != df_names
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This works, and I'm happy to see this merged in. However, if we wanted to use more public API and make things a bit easier for future maintainers we might do the following instead:

def test_different_names():
    with filetext(text) as fn:
        a = dd.read_csv(fn, blocksize="10kB")
        b = dd.read_csv(fn, blocksize="20kB") 
        assert a.name != b.name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's the goldilocks of tests! I'm happy to change it to that.

@mrocklin mrocklin merged commit 061613e into dask:master Nov 12, 2020
@mrocklin
Copy link
Copy Markdown
Member

Thanks @jsignell for fixing this and @nils-braun for raising

@jsignell jsignell deleted the blocksize-in-name branch November 16, 2020 18:50
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.

blocksize and persist has impact on result

3 participants