Skip to content

Run cudf_polars unit tests with RapidsMPF - #21807

Merged
rapids-bot[bot] merged 80 commits into
NVIDIA:mainfrom
mroeschke:ci/cudf_polars/conda_rapidsmpf
Mar 24, 2026
Merged

Run cudf_polars unit tests with RapidsMPF#21807
rapids-bot[bot] merged 80 commits into
NVIDIA:mainfrom
mroeschke:ci/cudf_polars/conda_rapidsmpf

Conversation

@mroeschke

@mroeschke mroeschke commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Description

Broken off from #21485

This PR takes a different approach from the linked PR by modifying an existing invocation in ci/run_cudf_polars_with_rapidsmpf_pytests.sh to run all cudf_polars unit tests with rapidsmpf in an existing non-blocking CI job (wheel-tests-cudf-polars-with-rapidsmpf) instead of the blocking wheel-tests-cudf-polars and conda-python-other-tests jobs. We will want to eventually pursue the latter approach once rapidsmpf development is more stable relative to cudf_polars usage.

This PR also aggressively xfails and skips tests known to fail in #21467

Checklist

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

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Mar 17, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Mar 17, 2026
@mroeschke mroeschke changed the title Run cudf_polars, conda unit tests with RapidsMPF Run cudf_polars unit tests with RapidsMPF Mar 17, 2026
# Run experimental tests with the "single" cluster mode and the "rapidsmpf" runtime
rapids-logger "Running experimental tests with the 'rapidsmpf' runtime and a 'single' cluster"
timeout 10m python -m pytest --cache-clear "$@" "tests/experimental" \
CUDF_POLARS__PARQUET_OPTIONS__USE_RAPIDSMPF_NATIVE=1 CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD=rapidsmpf timeout 10m python -m pytest --cache-clear "$@" tests \

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.

Hmm kind of annoying that all the cudf and pandas tests will run because of this change. Perhaps we can figure out how to avoid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think we either need to:

  1. Specifically include cudf_polars, cudf, cudf.pandas etc. specific CI files in the changed files logic
  2. Convince folks to split the ci directory to be project specific e.g. python/cudf_polars/ci/, python/cudf/ci etc. (probably a larger ask)

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR instead runs the entire cudf_polars test suite in the non-blocking cudf_polars rapidsmpf job as opposed to the blocking test_python_other and cudf_polars wheel test jobs.

I don't see how this change is being made. Don't you need to edit https://github.com/rapidsai/cudf/blob/main/ci/test_python_other.sh?

using_rapidsmpf: bool,
) -> None:
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
pytest.skip("Can segfault on 12.9 builds with rapidsmpf runtime.")

Do we have an issue tracking this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, updated the pytest.skips to fix the type and include the github link

def test_boolean_horizontal(expr, has_nulls, wide):
def test_boolean_horizontal(expr, has_nulls, wide, using_rapidsmpf):
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This typo occurs repeatedly.

Suggested change
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
pytest.skip("Can segfault on 12.9 builds with rapidsmpf runtime.")

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This makes way more sense now. Thanks for updating the description!

Comment thread python/cudf_polars/tests/test_config.py Outdated
monkeypatch: pytest.MonkeyPatch,
rapidsmpf_distributed_available: bool,
) -> None:
# TODO: Can remove once removed from ci/run_cudf_polars_pytests.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FWIW, I think keeping this is fine. If possible, our tests should be robust to what's in the environment when the test process starts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll just go ahead and revert this since I'll be removing the shuffler environment variable that affected the tests in this file.

# Run experimental tests with the "single" cluster mode and the "rapidsmpf" runtime
rapids-logger "Running experimental tests with the 'rapidsmpf' runtime and a 'single' cluster"
timeout 10m python -m pytest --cache-clear "$@" "tests/experimental" \
CUDF_POLARS__PARQUET_OPTIONS__USE_RAPIDSMPF_NATIVE=1 CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD=rapidsmpf timeout 10m python -m pytest --cache-clear "$@" tests \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you say why setting CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD was necessary? The default method should depend on the runtime

In [8]: import polars as pl
   ...: from cudf_polars.utils.config import ConfigOptions
   ...: 
   ...: 
   ...: engine = pl.GPUEngine(executor="streaming", executor_options={"runtime": "rapidsmpf"})
   ...: cfg = ConfigOptions.from_polars_engine(engine)
   ...: cfg.executor.shuffle_method
   ...: 
Out[8]: <ShuffleMethod._RAPIDSMPF_SINGLE: 'rapidsmpf-single'>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah fair point, I suppose I was trying to guarantee we would always use the rapidsmpf shuffler here (since there's logic for the distributed cluster falling back to the task shuffler), but I'll remove as it's not really necessary.

@mroeschke

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 4c1db9b into NVIDIA:main Mar 24, 2026
119 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Mar 24, 2026
@mroeschke
mroeschke deleted the ci/cudf_polars/conda_rapidsmpf branch March 24, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants