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

Function run_model_param_check

tests/python/test_model_compatibility.py:16–26  ·  view source on GitHub ↗
(name: str, config: Dict[str, Any])

Source from the content-addressed store, hash-verified

14
15
16def run_model_param_check(name: str, config: Dict[str, Any]) -> None:
17 assert config["learner"]["learner_model_param"]["num_feature"] == str(4)
18 assert config["learner"]["learner_train_param"]["booster"] == "gbtree"
19
20 booster = config["learner"]["gradient_booster"]
21 assert booster["name"] == "gbtree"
22 if name.find("1.0.0rc1") != -1:
23 # There's no `num_parallel_tree` in the model parameter in 1.0 (it was a
24 # configuration instead of a model parameter).
25 return
26 assert booster["gbtree_model_param"]["num_parallel_tree"] == str(gm.kForests)
27
28
29def run_booster_check(booster: xgboost.Booster, name: str) -> None:

Callers 2

run_booster_checkFunction · 0.85
run_scikit_model_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected