Cleanup Python GPU tests. (#9934)

* Cleanup Python GPU tests.

- Remove the use of `gpu_hist` and `gpu_id` in cudf/cupy tests.
- Move base margin test into the testing directory.
This commit is contained in:
Jiaming Yuan
2024-01-04 13:15:18 +08:00
committed by GitHub
parent 3c004a4145
commit 9f73127a23
14 changed files with 282 additions and 240 deletions

View File

@@ -1,9 +1,9 @@
import numpy as np
import pytest
from test_dmatrix import set_base_margin_info
import xgboost as xgb
from xgboost import testing as tm
from xgboost.testing.data import run_base_margin_info
try:
import modin.pandas as md
@@ -145,4 +145,4 @@ class TestModin:
np.testing.assert_array_equal(data.get_weight(), w)
def test_base_margin(self):
set_base_margin_info(md.DataFrame, xgb.DMatrix, "hist")
run_base_margin_info(md.DataFrame, xgb.DMatrix, "cpu")