MCPcopy Create free account
hub / github.com/dmlc/xgboost / check

Function check

demo/guide-python/callbacks.py:99–110  ·  view source on GitHub ↗
(as_pickle: bool)

Source from the content-addressed store, hash-verified

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)

Callers 7

check_point_callbackFunction · 0.70
test_estimator_regFunction · 0.50
TESTFunction · 0.50
MakeMethod · 0.50
TESTFunction · 0.50
TESTFunction · 0.50

Calls

no outgoing calls

Tested by 5

test_estimator_regFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40