Fix cupy without cudf import (#5219)
This commit is contained in:
parent
9c56480c61
commit
5d4c24a1fc
@ -688,7 +688,7 @@ class DMatrix(object):
|
||||
"""Set info type property into DMatrix."""
|
||||
|
||||
# If we are passed a dataframe, extract the series
|
||||
if isinstance(data, CUDF_DataFrame):
|
||||
if CUDF_INSTALLED and isinstance(data, CUDF_DataFrame):
|
||||
if len(data.columns) != 1:
|
||||
raise ValueError('Expecting meta-info to contain a single column')
|
||||
data = data[data.columns[0]]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user