(self)
| 69 | # TODO: This test is too slow |
| 70 | @pytest.mark.skipif(**tm.no_sklearn()) |
| 71 | def test_pickling(self) -> None: |
| 72 | x, y = build_dataset() |
| 73 | train_x = xgb.DMatrix(x, label=y) |
| 74 | |
| 75 | param = {"tree_method": "hist", "device": "cuda"} |
| 76 | bst = xgb.train(param, train_x) |
| 77 | self.run_pickling(bst) |
| 78 | |
| 79 | bst = xgb.XGBRegressor(**param).fit(x, y) |
| 80 | self.run_pickling(bst) |
| 81 | |
| 82 | param = {"booster": "gblinear", "updater": "coord_descent", "device": "cuda"} |
| 83 | bst = xgb.train(param, train_x) |
| 84 | self.run_pickling(bst) |
| 85 | |
| 86 | bst = xgb.XGBRegressor(**param).fit(x, y) |
| 87 | self.run_pickling(bst) |
| 88 | |
| 89 | @pytest.mark.mgpu |
| 90 | def test_wrap_gpu_id(self) -> None: |
nothing calls this directly
no test coverage detected