Skip to content

Conversation

@TomAugspurger
Copy link
Contributor

Description

This fixes the warnings in the dask-cudf test suite, so that the tests run with -Werror.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 30, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Dec 30, 2025
@TomAugspurger
Copy link
Contributor Author

/ok to test 7544eab

@GPUtester GPUtester moved this to In Progress in cuDF Python Dec 30, 2025
@TomAugspurger TomAugspurger added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 30, 2025
@TomAugspurger
Copy link
Contributor Author

/ok to test 2723bd7

@TomAugspurger
Copy link
Contributor Author

/ok to test 15edec7

return ngpus >= n


@pytest.fixture
Copy link
Contributor

Choose a reason for hiding this comment

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

Like you helped identify with the cudf_polars tests, should this be made module scope to not recreate this per test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in c6bc789.

We previously used the loop fixture from distributed. I think we don't need that: we shouldn't really be sensitive to which event loop the test is running on these days.

@TomAugspurger TomAugspurger marked this pull request as ready for review December 31, 2025 13:06
@TomAugspurger TomAugspurger requested review from a team as code owners December 31, 2025 13:06
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

I left one small non-blocking comment... do whatever you want with it. Otherwise looks good to me, approving from a ci-codeowners / packaging-codeowners perspective.

# This warning comes from dask-expr, and is probably a consequence of
# cudf's NA handling differing from pandas' default handling,
# since we try to construct an int64 ndarray with NaNs.
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding... why are these being added as pytest markers instead of in the configuration in pyproject.toml alongside other warning filters?

I think it also may be helpful to limit this to only dask_expr instead of all RuntimeWarning, so you have a chance to see and react to other RuntimeWarnings besides the one the comment describes.

And example of that:

filterwarnings = [
  ...
  "ignore::FutureWarning:sklearn",
  "ignore::DeprecationWarning:sklearn",
   ...
]

https://github.com/rapidsai/cuml/blob/5ca4f66369edc3a9877c76ca7748fe6183320dc6/python/cuml/pyproject.toml#L48

And docs on the syntax: https://docs.python.org/3/library/warnings.html#describing-warning-filters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My reasoning was to make it local: maybe it's just a personal preference, but I like the idea of putting general rules in the pyproject.toml (error by default) but override that locally in specific modules / functions.

I'll adopt your suggestion to filter this to a module.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, add a module filter, otherwise this is fine to define here. We only need to use pyproject.toml for global (or far-reaching, or large-but-temporary) ignores.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good, thanks for explaining that.

# This warning comes from dask-expr, and is probably a consequence of
# cudf's NA handling differing from pandas' default handling,
# since we try to construct an int64 ndarray with NaNs.
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, add a module filter, otherwise this is fine to define here. We only need to use pyproject.toml for global (or far-reaching, or large-but-temporary) ignores.

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

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants