Skip to content

Fix :DataFrame.head shouldn't warn when there's one partition#8091

Merged
jcrist merged 2 commits intodask:mainfrom
Patil2099:main
Oct 14, 2021
Merged

Fix :DataFrame.head shouldn't warn when there's one partition#8091
jcrist merged 2 commits intodask:mainfrom
Patil2099:main

Conversation

@Patil2099
Copy link
Copy Markdown
Contributor

Fixes #8088

@GPUtester
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@jrbourbeau
Copy link
Copy Markdown
Member

add to allowlist

Copy link
Copy Markdown
Member

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Thanks, can you add a test? I think something like with pytest.warns(None) will check that no warning is raised.

Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @Patil2099! Could you add a test that ensures no warning is raised when npartitions == self.npartitions or npartitions == -1 is True?

@jrbourbeau
Copy link
Copy Markdown
Member

Whoops, @TomAugspurger beat me to it : )

@pentschev
Copy link
Copy Markdown
Member

GPU issues should be fixed now that rapidsai/cudf#9118 is in. Rerunning tests.

@pentschev
Copy link
Copy Markdown
Member

rerun tests

@ncclementi
Copy link
Copy Markdown
Member

@Patil2099 checking in here, seeing if you are still working on this, and loop in with the suggestions and test addition mentioned above. Thank you for all your work!

- Add test
- Simplify logic
@jcrist
Copy link
Copy Markdown
Member

jcrist commented Oct 14, 2021

I've pushed a test and some simplified logic. Will merge once tests pass. Thanks @Patil2099!

@jcrist jcrist merged commit 9c94ea2 into dask:main Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFrame.head shouldn't warn when there's one partition

7 participants