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

Function save_load

tests/python/test_with_sklearn.py:757–763  ·  view source on GitHub ↗
(clf: xgb.XGBClassifier)

Source from the content-addressed store, hash-verified

755 save_load_counter = [0]
756
757 def save_load(clf: xgb.XGBClassifier) -> xgb.XGBClassifier:
758 path = tmp_path / f"model_{save_load_counter[0]}.json"
759 save_load_counter[0] += 1
760 clf.save_model(path)
761 clf = xgb.XGBClassifier()
762 clf.load_model(path)
763 return clf
764
765 def get_tm(clf: xgb.XGBClassifier) -> str:
766 tm_val = json.loads(clf.get_booster().save_config())["learner"][

Callers 1

test_parameters_accessFunction · 0.85

Calls 2

save_modelMethod · 0.45
load_modelMethod · 0.45

Tested by

no test coverage detected