Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-package/xgboost/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def concat(value: Any) -> Any: # pylint: disable=too-many-return-statements
from cudf import concat as CUDF_concat # pylint: disable=import-error

return CUDF_concat(value, axis=0)
if lazy_isinstance(value[0], "cupy._core.core", "ndarray"):
if lazy_isinstance(value[0], "cupy", "ndarray"):
Comment thread
quasiben marked this conversation as resolved.
Outdated
import cupy

# pylint: disable=c-extension-no-member,no-member
Expand Down
1 change: 0 additions & 1 deletion python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ def _is_cupy_array(data) -> bool:
for n in ("cupy.core.core", "cupy", "cupy._core.core")
)


def _transform_cupy_array(data):
import cupy # pylint: disable=import-error
if not hasattr(data, '__cuda_array_interface__') and hasattr(
Expand Down
1 change: 1 addition & 0 deletions tests/python-gpu/test_from_cupy.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,5 @@ def test_specified_device(self):
np.float32, xgb.DeviceQuantileDMatrix, np.nan)
with pytest.raises(xgb.core.XGBoostError):
xgb.train({'tree_method': 'gpu_hist', 'gpu_id': 1},
'fail_on_invalid_gpu_id': True},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fail without additional parameters assuming there is more than 1 device available during testing.

dtrain, num_boost_round=10)