Skip to content

Reduce verbosity of cudf-polars-polars tests - #22543

Merged
rapids-bot[bot] merged 11 commits into
NVIDIA:mainfrom
TomAugspurger:tom/cudf-polars-polars-verbosity
May 28, 2026
Merged

Reduce verbosity of cudf-polars-polars tests#22543
rapids-bot[bot] merged 11 commits into
NVIDIA:mainfrom
TomAugspurger:tom/cudf-polars-polars-verbosity

Conversation

@TomAugspurger

@TomAugspurger TomAugspurger commented May 18, 2026

Copy link
Copy Markdown
Contributor

GitHub Actions's UI doesn't load the entire logs for the cudf-polars polars tests job (e.g.
https://github.com/rapidsai/cudf/actions/runs/26022392040/job/76487038645).

This PR adjusts how we run cudf-polars tests (our own, and the polars test suite).

  • Add pytest-timeout, so we get per-test timeout in addition to the global timeout on the job / command. Per-test timeouts enforced by the test runner are better since it will get to report which test timed out. The timeout on the command is good to have as a backup, in case the signal sent by pytest-timeout is unable to interrupt the test. This is configured through our pyproject.toml for cudf-polars' tests, and on the command line for the polars tests.
  • Add --durations to print the 10 longest test durations. This will help with tuning the timeout for individual tests.
  • Removed the -vv to reduce the verbosity of the test output
  • Added -ra to print the reasons for xfails / skips, in addition to failures and errors (see the pytest docs)

Together, these changes should provide similar output before aside from printing the name of each passing test.

GitHub Actions's UI doesn't load the entire logs for the cudf-polars
polars tests job (e.g.
https://github.com/rapidsai/cudf/actions/runs/26022392040/job/76487038645).

This removes the verbose flag we pass to pytest.
@TomAugspurger
TomAugspurger requested a review from a team as a code owner May 18, 2026 12:32
@TomAugspurger
TomAugspurger requested a review from gforsyth May 18, 2026 12:32
@TomAugspurger TomAugspurger added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 18, 2026
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds pytest-timeout to test dependencies and pytest config (timeout=45), appends pytest duration-reporting flags to Polars CI test invocations, updates an SPDX year, and removes -vv from two pytest calls in the Polars CI test runner.

Changes

CI test runner and environments

Layer / File(s) Summary
Add pytest-timeout and configure timeout
dependencies.yaml, python/cudf_polars/pyproject.toml, conda/environments/*
Adds pytest-timeout to test_python_cudf_polars and conda environment dependency lists; sets timeout = 45 under [tool.pytest.ini_options] in pyproject.toml.
Enable pytest durations reporting
ci/test_python_other.sh, ci/test_wheel_cudf_polars.sh
Appends --durations=10 --durations-min=10 (or --durations 10 --durations-min 10) to Polars pytest invocations; updates SPDX year header in ci/test_python_other.sh.
Remove verbosity flags from pytest commands
ci/run_cudf_polars_polars_tests.sh
Removes -vv from two python -m pytest invocations used for in-memory GPU engine and injected SPMD GPU engine runs; other pytest options unchanged.

🎯 2 (Simple) | ⏱️ ~10 minutes

  • rapidsai/cudf#22505: Modifies ci/test_wheel_cudf_polars.sh test invocation; related to pytest duration/timeout flags.

Suggested reviewers:

  • gforsyth
  • mroeschke
  • jameslamb
  • Matt711
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: reducing verbosity of cudf-polars-polars tests, which is confirmed by the removal of -vv flags and additions of more targeted output options like --durations and -ra.
Description check ✅ Passed The description is directly related to the changeset, providing clear rationale for each modification: pytest-timeout addition, --durations flags, removal of -vv verbosity, and addition of -ra options across the test configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@TomAugspurger

TomAugspurger commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

I'll check to ensure that we still get a feedback on which test is hanging test if it's killed by the timeout.

- add pytest-timeout
- add default per-test timeout
- print durations
@TomAugspurger
TomAugspurger requested a review from a team as a code owner May 20, 2026 12:42
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels May 20, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 20, 2026
@TomAugspurger
TomAugspurger marked this pull request as draft May 20, 2026 12:55
@copy-pr-bot

copy-pr-bot Bot commented May 20, 2026

Copy link
Copy Markdown

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.

@TomAugspurger
TomAugspurger marked this pull request as ready for review May 20, 2026 13:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ci/test_wheel_cudf_polars.sh (1)

78-78: 💤 Low value

Consider using consistent pytest flag syntax across CI scripts.

This line uses space-separated syntax (--durations 10 --durations-min 10), while ci/test_python_other.sh:53 uses equals syntax (--durations=10 --durations-min=10). Both are valid pytest syntax, but consistency improves maintainability across the CI infrastructure.

♻️ Proposed fix for consistency
-        --durations 10 --durations-min 10 \
+        --durations=10 --durations-min=10 \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/test_wheel_cudf_polars.sh` at line 78, The pytest flags in
ci/test_wheel_cudf_polars.sh use space-separated syntax for --durations and
--durations-min; make them consistent with the other CI script by switching to
equals syntax. Update the invocation that currently contains "--durations 10
--durations-min 10" to "--durations=10 --durations-min=10" (referencing the
flags --durations and --durations-min in ci/test_wheel_cudf_polars.sh) so both
CI scripts use the same pytest flag style.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@ci/test_wheel_cudf_polars.sh`:
- Line 78: The pytest flags in ci/test_wheel_cudf_polars.sh use space-separated
syntax for --durations and --durations-min; make them consistent with the other
CI script by switching to equals syntax. Update the invocation that currently
contains "--durations 10 --durations-min 10" to "--durations=10
--durations-min=10" (referencing the flags --durations and --durations-min in
ci/test_wheel_cudf_polars.sh) so both CI scripts use the same pytest flag style.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4360b778-c6f5-41da-8648-53cda8706d4b

📥 Commits

Reviewing files that changed from the base of the PR and between a6a7989 and 2220e81.

📒 Files selected for processing (3)
  • ci/run_cudf_polars_polars_tests.sh
  • ci/test_python_other.sh
  • ci/test_wheel_cudf_polars.sh
✅ Files skipped from review due to trivial changes (1)
  • ci/run_cudf_polars_polars_tests.sh

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

It seems like some of the polars tests take at least 60 seconds to run. At least we get to see what timeouts look like: https://github.com/rapidsai/cudf/actions/runs/26164254515/job/76969242214?pr=22543#step:13:3647

In our tests, we'd be able to increase the timeout on that test specifically in the source code. For now, bumping the timeout on the CLI is probably our best option.

@wence-

wence- commented May 26, 2026

Copy link
Copy Markdown
Contributor

Yeah, that one test actually tests 11250 different cases...

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit e21e99a into NVIDIA:main May 28, 2026
117 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python May 28, 2026
@TomAugspurger
TomAugspurger deleted the tom/cudf-polars-polars-verbosity branch May 28, 2026 11:46
rapids-bot Bot pushed a commit that referenced this pull request May 29, 2026
…_polars tests (#22669)

A complement to #22543, this PR explicitly passes the `timeout` parameter to subprocess/threading/Future APIs that accept one, using a global value of 120 seconds

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Lawrence Mitchell (https://github.com/wence-)
  - Tom Augspurger (https://github.com/TomAugspurger)

URL: #22669
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