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

Method test_model_json_io

tests/python/test_model_io.py:89–102  ·  view source on GitHub ↗
(self, ext: str)

Source from the content-addressed store, hash-verified

87
88 @pytest.mark.parametrize("ext", ["json", "ubj"])
89 def test_model_json_io(self, ext: str) -> None:
90 parameters = {"booster": "gbtree", "tree_method": "hist"}
91 self.run_model_json_io(parameters, ext)
92 parameters = {
93 "booster": "gbtree",
94 "tree_method": "hist",
95 "multi_strategy": "multi_output_tree",
96 "objective": "multi:softmax",
97 }
98 self.run_model_json_io(parameters, ext)
99 parameters = {"booster": "gblinear"}
100 self.run_model_json_io(parameters, ext)
101 parameters = {"booster": "dart", "tree_method": "hist"}
102 self.run_model_json_io(parameters, ext)
103
104 def test_categorical_model_io(self, tmp_path: Path) -> None:
105 X, y = tm.make_categorical(256, 16, 71, onehot=False)

Callers

nothing calls this directly

Calls 1

run_model_json_ioMethod · 0.95

Tested by

no test coverage detected