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

Method getCustomModelNamesAndDescriptions

mlmodel/src/Utils.cpp:189–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189std::vector<std::pair<std::string, std::string> > CoreML::getCustomModelNamesAndDescriptions(const Specification::Model& model) {
190 std::vector<std::pair<std::string, std::string> > retval;
191 walkModelAndPipeline(model, [&retval](const auto& m) {
192 if (m.Type_case() == Specification::Model::kCustomModel) {
193 retval.push_back(std::make_pair(m.custommodel().classname(), m.custommodel().description()));
194 }
195 return false; // Do not stop walking
196 });
197 return retval;
198}
199
200void CoreML::downgradeSpecificationVersion(Specification::Model *pModel) {
201

Callers

nothing calls this directly

Calls 3

walkModelAndPipelineFunction · 0.85
push_backMethod · 0.80
descriptionMethod · 0.80

Tested by

no test coverage detected