Skip to content

Fix flaky cudf-polars Quent integration test - #23482

Merged
vyasr merged 1 commit into
NVIDIA:release/26.08from
TomAugspurger:tom/flaky-quent-test-fix
Jul 31, 2026
Merged

Fix flaky cudf-polars Quent integration test#23482
vyasr merged 1 commit into
NVIDIA:release/26.08from
TomAugspurger:tom/flaky-quent-test-fix

Conversation

@TomAugspurger

Copy link
Copy Markdown
Contributor

Description

On main and release/26.08, the following will error reliably:

pytest -p no:randomly -n0 \
	python/cudf_polars/tests/streaming/test_ray.py::test_yields_engine \
	python/cudf_polars/tests/quent/test_quent_integration.py

In CI, it will fail if a worker that previously happened to run one of the ray tests with 0 GPUs happened to worksteal the quent integration tests.

This fixes the issue by passing through ray_init_options and ray_num_ranks when creating the RayEngine for the quent tests, similar to the rest of the tests

Closes #23441

Checklist

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

On `main`, the following will error reliably:

```
pytest -p no:randomly -n0 \
	python/cudf_polars/tests/streaming/test_ray.py::test_yields_engine \
	python/cudf_polars/tests/quent/test_quent_integration.py
```

In CI, it will fail if a worker that previously happened to run one of
the ray tests with 0 GPUs happened to worksteal the quent integration
tests.

This fixes the issue by passing through `ray_init_options` and
`ray_num_ranks` when creating the RayEngine for the quent tests, similar
to the rest of the tests

Closees NVIDIA#23441
@TomAugspurger
TomAugspurger requested a review from a team as a code owner July 30, 2026 15:24
@TomAugspurger
TomAugspurger requested a review from mroeschke July 30, 2026 15:24
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Jul 30, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jul 30, 2026
@TomAugspurger TomAugspurger added bug Something isn't working non-breaking Non-breaking change labels Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 75a00f90-f90a-4dbd-813b-4582e543c3b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4a902a2 and 35074e5.

📒 Files selected for processing (1)
  • python/cudf_polars/tests/quent/test_quent_integration.py

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Enhanced Ray-backed integration test setup with configurable rank counts and initialization options.
    • Enabled GPU sharing during Ray test execution.
    • Improved support for externally controlled Ray engine configurations.

Walkthrough

The Quent integration fixture now accepts Ray rank and initialization options, passes them to RayEngine, and enables GPU sharing for the Ray backend.

Changes

Ray Quent fixture

Layer / File(s) Summary
Configure RayEngine fixture setup
python/cudf_polars/tests/quent/test_quent_integration.py
The fixture adds typed Ray configuration inputs and constructs RayEngine with explicit ranks, initialization options, and GPU sharing enabled.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • #23292 — Both changes update RayEngine test initialization with rank configuration and GPU-sharing behavior.

Suggested reviewers: mroeschke

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing a flaky Quent integration test.
Description check ✅ Passed The description directly explains the RayEngine setup fix and the flaky test failure it addresses.
Linked Issues check ✅ Passed The changes address issue #23441 by passing Ray init options and num_ranks to avoid the no-GPU startup error.
Out of Scope Changes check ✅ Passed The PR stays focused on the Quent Ray test fixture and related Ray initialization handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@vyasr vyasr 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.

Approving for now to avoid the issues, although it would be nice if there was a context manager or similar approach that we could do to avoid global state mutations causing problems like this.

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

Agreed, though I'm not sure how easy that is to do... Our tests really do need to share the underlying Ray cluster resources between tests, since they're so expensive to create. The current API of RayEngine accepting ray_init_options and optionally create those resources makes things awkward. If RayEngine only accepted a connection to a running ray cluster things might be less awkward in our tests.

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

/merge

@TomAugspurger
TomAugspurger removed the request for review from mroeschke July 30, 2026 17:53
@mroeschke

Copy link
Copy Markdown
Contributor

/merge

@vyasr
vyasr merged commit 132eaef into NVIDIA:release/26.08 Jul 31, 2026
110 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jul 31, 2026
@TomAugspurger
TomAugspurger deleted the tom/flaky-quent-test-fix branch July 31, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cudf-polars Issues specific to cudf-polars non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants