Skip to content

CI Extend time limit for hypothesis tests#8346

Open
betatim wants to merge 1 commit into
rapidsai:mainfrom
betatim:longer-hypothesis-time
Open

CI Extend time limit for hypothesis tests#8346
betatim wants to merge 1 commit into
rapidsai:mainfrom
betatim:longer-hypothesis-time

Conversation

@betatim

@betatim betatim commented Jul 8, 2026

Copy link
Copy Markdown
Member

Running pytest -ra -v test_logistic_regression.py would reproducibly run into the time limit locally. So we extend the limit to 5s. As part of this we noticed that it is a bit opaque why and how the time limit is disabled when running in the CI, so this adds comments explaining this behaviour.

closes #8312

Add a comment explaining why there is no limit for CI jobs and how we
detect that we are running in a CI.
@betatim betatim requested a review from a team as a code owner July 8, 2026 07:11
@betatim betatim requested a review from csadorf July 8, 2026 07:11
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 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: 326702d8-82ea-42d0-beeb-27c33c46c6e1

📥 Commits

Reviewing files that changed from the base of the PR and between 9699777 and 9fe5f79.

📒 Files selected for processing (1)
  • python/cuml/tests/conftest.py

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Relaxed local test timing limits for Hypothesis unit tests outside CI, reducing false timeouts while keeping CI behavior unchanged.

Walkthrough

The Hypothesis "unit" test profile's non-CI deadline in python/cuml/tests/conftest.py was increased from 2000ms to 5000ms, and comments were added documenting CI environment variable behavior affecting the deadline setting.

Changes

Hypothesis Deadline Configuration

Layer / File(s) Summary
Deadline update and CI comments
python/cuml/tests/conftest.py
Non-CI deadline for the "unit" Hypothesis profile raised from 2000ms to 5000ms; comments added explaining CI environment variable handling.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: extending the hypothesis test time limit in CI-related test setup.
Description check ✅ Passed The description matches the change and explains the timeout increase plus the added CI comments.
Linked Issues check ✅ Passed The change raises the hypothesis deadline to 5s and clarifies CI behavior, which addresses the linked deadline-failure issue.
Out of Scope Changes check ✅ Passed The PR only touches the hypothesis test profile settings and related comments, with no obvious unrelated changes.
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.

@betatim betatim added improvement Improvement / enhancement to an existing function breaking Breaking change labels Jul 8, 2026
@betatim

betatim commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

CI failure is probably due to NVIDIA/raft#3052

@RAMitchell

Copy link
Copy Markdown
Contributor

If its just one test I would consider tweaking or perf debugging the test. No hypothesis tests should be exceeding 5 seconds as its common to run hundreds of cases of that one test.

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

I agree with @RAMitchell that we should investigate when tests take significantly longer, but I know from experience that it is sometimes very hard to stay below this deadline for more complex strategies. I'm ok with increasing the deadline for now.

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

Labels

breaking Breaking change Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] logistic regression Python tests exceed hypothesis budget

4 participants