MCPcopy Create free account
hub / github.com/dmlc/treelite / SerializeTaskParametersToJSON

Function SerializeTaskParametersToJSON

src/json_serializer.cc:136–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135template <typename WriterType>
136void SerializeTaskParametersToJSON(WriterType& writer, treelite::Model const& model) {
137 writer.Key("num_target");
138 writer.Int(model.num_target);
139 writer.Key("num_class");
140 WriteArray(writer, model.num_class);
141 writer.Key("leaf_vector_shape");
142 WriteArray(writer, model.leaf_vector_shape);
143}
144
145template <typename WriterType>
146void SerializeModelParametersToJSON(WriterType& writer, treelite::Model const& model) {

Callers 1

DumpModelAsJSONFunction · 0.85

Calls 3

WriteArrayFunction · 0.85
IntMethod · 0.80
KeyMethod · 0.45

Tested by

no test coverage detected