(as_pickle: bool)
| 97 | rounds = 2 |
| 98 | |
| 99 | def check(as_pickle: bool) -> None: |
| 100 | for i in range(0, 10, rounds): |
| 101 | if i == 0: |
| 102 | continue |
| 103 | if as_pickle: |
| 104 | path = os.path.join(tmpdir, "model_" + str(i) + ".pkl") |
| 105 | else: |
| 106 | path = os.path.join( |
| 107 | tmpdir, |
| 108 | f"model_{i}.{xgb.callback.TrainingCheckPoint.default_format}", |
| 109 | ) |
| 110 | assert os.path.exists(path) |
| 111 | |
| 112 | X, y = load_breast_cancer(return_X_y=True) |
| 113 | m = xgb.DMatrix(X, y) |
no outgoing calls