diff --git a/python-package/xgboost/data.py b/python-package/xgboost/data.py index 5d1e2d41d742..58b63a5dccdd 100644 --- a/python-package/xgboost/data.py +++ b/python-package/xgboost/data.py @@ -725,6 +725,8 @@ def _device_quantile_transform(data, feature_names, feature_types): return data, feature_names, feature_types if _is_dlpack(data): return _transform_dlpack(data), feature_names, feature_types + raise TypeError('Value type is not supported for data iterator:' + + str(type(data))) def dispatch_device_quantile_dmatrix_set_data(proxy, data): diff --git a/tests/python/test_basic.py b/tests/python/test_basic.py index 979bc37963b4..dad7ddc9db0c 100644 --- a/tests/python/test_basic.py +++ b/tests/python/test_basic.py @@ -68,7 +68,7 @@ def test_basic(self): # save dmatrix into binary buffer dtest.save_binary(dtest_path) # save model - model_path = 'model.booster' + model_path = os.path.join(tmpdir, 'model.booster') bst.save_model(model_path) # load model and data in bst2 = xgb.Booster(model_file=model_path)