MCPcopy Create free account
hub / github.com/apple/coremltools / toStringStream

Method toStringStream

mlmodel/src/Model.cpp:314–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312 }
313
314 void Model::toStringStream(std::stringstream& ss) const {
315 ss << "Spec version: " << m_spec->specificationversion() << "\n";
316 ss << "Model type: " << MLModelType_Name(static_cast<MLModelType>(m_spec->Type_case())) << "\n";
317 ss << "Interface:" << "\n";
318 ss << "\t" << "Inputs:" << "\n";
319 for (const auto& input : m_spec->description().input()) {
320 writeFeatureDescription(ss, input);
321 }
322 ss << "\t" << "Outputs:" << "\n";
323 for (const auto& output : m_spec->description().output()) {
324 writeFeatureDescription(ss, output);
325 }
326 if (m_spec->description().predictedfeaturename() != "") {
327 ss << "\t" << "Predicted feature name: " << m_spec->description().predictedfeaturename() << "\n";
328 }
329 if (m_spec->description().predictedprobabilitiesname() != "") {
330 ss << "\t" << "Predicted probability name: " << m_spec->description().predictedprobabilitiesname() << "\n";
331 }
332 }
333
334 std::string Model::toString() const {
335 std::stringstream ss;

Callers

nothing calls this directly

Calls 2

writeFeatureDescriptionFunction · 0.85
descriptionMethod · 0.80

Tested by

no test coverage detected