[back port] Use CPU input for test_boost_from_prediction. (#6818) (#6824)

This commit is contained in:
Jiaming Yuan 2021-04-05 18:32:04 +08:00 committed by GitHub
parent 43f52ed33c
commit 604ae01b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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