Value type error when using dask distributed

Here is the code that reproduces the error on my machine:

import numpy as np
import xgboost as xgb
import dask.array as da
import dask.distributed
from dask_cuda import LocalCUDACluster
from dask.distributed import Client

X = da.from_array(np.random.randint(0,10,size=(10,10)))
Y = da.from_array(np.random.randint(0,10,size=(10,1)))
da.persist(X,Y)

cluster = LocalCUDACluster(n_workers=4, threads_per_worker=1)
client = Client(cluster)

dtrain = xgb.dask.DaskDeviceQuantileDMatrix(client=client, data=X, label=Y)

params = {'tree_method':'gpu_hist','objective':'rank:pairwise','min_child_weight':1,'max_depth':3,'eta':0.1} 
watchlist = [(trainLong, 'train')] 
reg= xgb.dask.train(client, params, dtrain, num_boost_round=10,evals=watchlist,verbose_eval=1)

And here is a summary of the error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-ff1b0329f2f9> in <module>
      1 params = {'tree_method':'gpu_hist','objective':'rank:pairwise','min_child_weight':1,'max_depth':3,'eta':0.1}
      2 watchlist = [(trainLong, 'train')]
----> 3 regLong = xgb.dask.train(client, params, trainLong, num_boost_round=10,evals=watchlist,verbose_eval=1)

/usr/local/share/anaconda3/lib/python3.7/site-packages/xgboost/data.py in _device_quantile_transform()
    804         return _transform_dlpack(data), feature_names, feature_types
    805     raise TypeError('Value type is not supported for data iterator:' +
--> 806                     str(type(data)))
    807 
    808 

TypeError: Value type is not supported for data iterator:<class 'numpy.ndarray'>

Some how the Device Quantile Matrix is still passing through as a numpy array???

I have tried using a pandas dataframe and converting that into a dask dataframe and then that into a Device Quantile Matrix…

I am using XGBoost version 1.3.1

I fixed this by adding a line which loads all the arrays into the GPU.