Skip to content

Expand CPU quantile property tests and remove redundant cases#12155

Merged
RAMitchell merged 6 commits intodmlc:masterfrom
RAMitchell:quantile-container-test-strategy
Apr 10, 2026
Merged

Expand CPU quantile property tests and remove redundant cases#12155
RAMitchell merged 6 commits intodmlc:masterfrom
RAMitchell:quantile-container-test-strategy

Conversation

@RAMitchell
Copy link
Copy Markdown
Member

Summary

This PR continues the CPU quantile test rewrite by expanding the property-style coverage in
test_quantile.cc and removing redundant legacy CPU quantile tests.

The new CPU property suites now cover:

  • summary-level sketch invariants
  • container-level cut invariants
  • SketchOnDMatrix wrapper invariants
  • distributed row-split and column-split properties

What Changed

  • broaden the shared CPU quantile case matrix in tests/cpp/common/test_quantile_helpers.h
  • add local cut validators used by the new property tests
  • replace legacy distributed identity-style tests with property checks against reference data
  • remove redundant CPU quantile tests from test_quantile.cc and test_hist_util.cc

Testing

  • cmake --build build-cpu --target testxgboost -j35
  • focused CPU quantile slice

Result:

  • 140/140 passed

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Expands the CPU quantile test rewrite by adding property-style invariants for summary/container/sketch paths (including distributed row-/col-split) and removing redundant legacy CPU quantile tests.

Changes:

  • Refactors summary invariants into a shared helper and adds container-level cut validators (numerical + categorical).
  • Adds new CPU property suites covering HostSketchContainer, SketchOnDMatrix, and distributed row-/column-split behavior.
  • Removes legacy CPU quantile/hist-util tests that are now covered by the new property checks.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/cpp/common/test_quantile.cc Adds new property-based test suites for summaries/cuts (local + distributed), and removes redundant legacy tests.
tests/cpp/common/test_quantile_helpers.h Introduces container-case matrix, reference-column tooling, and cut validation helpers used by the new tests.
tests/cpp/common/test_hist_util.cc Removes redundant CPU sketch/cut accuracy tests superseded by the new quantile property coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RAMitchell RAMitchell marked this pull request as ready for review April 10, 2026 10:25
@RAMitchell RAMitchell requested a review from trivialfis April 10, 2026 10:25
@RAMitchell RAMitchell merged commit cc451b6 into dmlc:master Apr 10, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants