Add more tests and doc for QDM. (#10692)

This commit is contained in:
Jiaming Yuan
2024-08-16 23:30:04 +08:00
committed by GitHub
parent 582ea104b5
commit 2258bc870d
7 changed files with 61 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import xgboost as xgb
from xgboost import testing as tm
from xgboost.testing.data import check_inf
from xgboost.testing.data_iter import run_mixed_sparsity
from xgboost.testing.quantile_dmatrix import check_ref_quantile_cut
sys.path.append("tests/python")
import test_quantile_dmatrix as tqd
@@ -142,6 +143,9 @@ class TestQuantileDMatrix:
{"tree_method": "approx", "max_bin": max_bin}, Xy, num_boost_round=4
)
def test_ref_quantile_cut(self) -> None:
check_ref_quantile_cut("cuda")
@pytest.mark.skipif(**tm.no_cupy())
def test_metainfo(self) -> None:
import cupy as cp

View File

@@ -321,4 +321,4 @@ class TestGPUUpdaters:
@pytest.mark.skipif(**tm.no_cudf())
def test_get_quantile_cut(self) -> None:
check_get_quantile_cut("gpu_hist")
check_get_quantile_cut("hist", "cuda")