Skip to content

Commit

Permalink
Check cudf lazily (#8084)
Browse files Browse the repository at this point in the history
  • Loading branch information
grafail committed Jul 17, 2022
1 parent a33f35e commit 579ab23
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python-package/xgboost/data.py
Expand Up @@ -745,11 +745,7 @@ def _from_cudf_df(


def _is_cudf_ser(data: DataType) -> bool:
try:
import cudf
except ImportError:
return False
return isinstance(data, cudf.Series)
return lazy_isinstance(data, "cudf.core.series", "Series")


def _is_cupy_array(data: DataType) -> bool:
Expand Down

0 comments on commit 579ab23

Please sign in to comment.