Revert "Use CPU input for test_boost_from_prediction. (#6818)" (#6858)

This reverts commit 74f3a2f4b5c2654af90d1477fd543b5d97280fbe.
This commit is contained in:
Jiaming Yuan 2021-04-20 14:54:02 +08:00 committed by GitHub
parent 2c684ffd32
commit bec2b4f094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,11 +175,12 @@ def run_gpu_hist(
@pytest.mark.skipif(**tm.no_cudf()) @pytest.mark.skipif(**tm.no_cudf())
def test_boost_from_prediction(local_cuda_cluster: LocalCUDACluster) -> None: def test_boost_from_prediction(local_cuda_cluster: LocalCUDACluster) -> None:
import cudf
from sklearn.datasets import load_breast_cancer from sklearn.datasets import load_breast_cancer
with Client(local_cuda_cluster) as client: with Client(local_cuda_cluster) as client:
X_, y_ = load_breast_cancer(return_X_y=True) X_, y_ = load_breast_cancer(return_X_y=True)
X = dd.from_array(X_, chunksize=100) X = dd.from_array(X_, chunksize=100).map_partitions(cudf.from_pandas)
y = dd.from_array(y_, chunksize=100) y = dd.from_array(y_, chunksize=100).map_partitions(cudf.from_pandas)
run_boost_from_prediction(X, y, "gpu_hist", client) run_boost_from_prediction(X, y, "gpu_hist", client)