Skip to content

A few cudf fixups - #8105

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
jcrist:update-cudf
May 14, 2026
Merged

A few cudf fixups#8105
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
jcrist:update-cudf

Conversation

@jcrist

@jcrist jcrist commented May 14, 2026

Copy link
Copy Markdown
Member

Some recent cudf changes (due to fixing NVIDIA/cudf#22136) have caused some test failures.

  • Fixes failing test
  • Removes no longer needed workaround

@jcrist jcrist self-assigned this May 14, 2026
@jcrist
jcrist requested a review from a team as a code owner May 14, 2026 14:00
@jcrist
jcrist requested a review from dantegd May 14, 2026 14:00
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 14, 2026
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label May 14, 2026
@coderabbitai

coderabbitai Bot commented May 14, 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: 10eaec08-06f9-496f-ba20-0dcea7e6a2e2

📥 Commits

Reviewing files that changed from the base of the PR and between 4b66e2c and e915b36.

📒 Files selected for processing (2)
  • python/cuml/cuml/internals/validation.py
  • python/cuml/tests/test_validation.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Streamlined dtype conversion in array validation for improved performance
    • Fixed validation behavior when handling float16 data types

Walkthrough

The PR refactors dtype coercion in cuML's array validation. check_array's dense CUDA/cuDF conversion now passes dtype directly to cudf.to_cupy(dtype=dtype) instead of performing manual pre-casting with astype(), removing workaround comments. The corresponding test adjusts how float16 inputs are normalized during NumPy conversion for comparison.

Changes

cuDF dtype coercion fixes

Layer / File(s) Summary
Dense conversion dtype coercion
python/cuml/cuml/internals/validation.py, python/cuml/tests/test_validation.py
check_array now relies on cudf.to_cupy(dtype=dtype) for dtype coercion, removing the manual astype() workaround step. Tests adjust float16 input handling during NumPy conversion to ensure consistent comparison.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rapidsai/cuml#8038: Both PRs modify the check_array dense CUDA/cuDF conversion path in validation.py to change dtype coercion handling via cudf.to_* calls, directly connected at the code level.

Suggested labels

Cython / Python

Suggested reviewers

  • divyegala
  • csadorf
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'A few cudf fixups' is vague and generic, using non-descriptive terms that don't clearly convey the specific changes being made. Consider a more descriptive title like 'Fix dtype handling in check_array cudf conversion and update test expectations'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, referencing recent cudf changes and mentioning test fixes and workaround removal.
Linked Issues check ✅ Passed The PR addresses issue #22136 by removing the workaround for to_cupy(dtype=...) that was failing with cudf changes, and updates test expectations accordingly.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing cudf compatibility issues; the modifications to validation.py and test_validation.py align with the stated objective of addressing cudf #22136.

✏️ 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.

@jcrist

jcrist commented May 14, 2026

Copy link
Copy Markdown
Member Author

/merge

1 similar comment
@csadorf

csadorf commented May 14, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 2560041 into NVIDIA:main May 14, 2026
176 of 178 checks passed
@jcrist
jcrist deleted the update-cudf branch May 14, 2026 15:34
This was referenced May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants