From 4546a239524a61a9983bbf99d61e27df9a7b0d80 Mon Sep 17 00:00:00 2001 From: Dmitry Razdoburdin <> Date: Fri, 17 Nov 2023 06:43:09 -0800 Subject: [PATCH] fixes for predictor tests --- tests/python-sycl/test_sycl_prediction.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/python-sycl/test_sycl_prediction.py b/tests/python-sycl/test_sycl_prediction.py index 5743f747080a..c0ddf5134201 100644 --- a/tests/python-sycl/test_sycl_prediction.py +++ b/tests/python-sycl/test_sycl_prediction.py @@ -125,7 +125,9 @@ def test_sklearn(self): tm.make_dataset_strategy(), shap_parameter_strategy) @settings(deadline=None) def test_shap(self, num_rounds, dataset, param): - param.update({"device": "cpu"}) + if dataset.name.endswith("-l1"): # not supported by the exact tree method + return + param.update({"tree_method": "hist", "device": "cpu"}) param = dataset.set_params(param) dmat = dataset.get_dmat() bst = xgb.train(param, dmat, num_rounds) @@ -140,7 +142,9 @@ def test_shap(self, num_rounds, dataset, param): tm.make_dataset_strategy(), shap_parameter_strategy) @settings(deadline=None, max_examples=20) def test_shap_interactions(self, num_rounds, dataset, param): - param.update({"device": "cpu"}) + if dataset.name.endswith("-l1"): # not supported by the exact tree method + return + param.update({"tree_method": "hist", "device": "cpu"}) param = dataset.set_params(param) dmat = dataset.get_dmat() bst = xgb.train(param, dmat, num_rounds)