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

Method replaceRootModel

modelpackage/src/ModelPackage.cpp:437–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437std::string ModelPackageImpl::replaceRootModel(const std::filesystem::path& path, const std::string& name, const std::string& author, const std::string& description)
438{
439 if (m_manifest->hasKey(kModelPackageRootModelKey)) {
440 auto rootModelIdentifier = m_manifest->getString(kModelPackageRootModelKey);
441 removeItem(rootModelIdentifier);
442 }
443
444 auto identifier = addItem(path, name, author, description);
445 m_manifest->setString(kModelPackageRootModelKey, identifier);
446 return identifier;
447}
448
449std::shared_ptr<ModelPackageItemInfo> ModelPackageImpl::getRootModel() const
450{

Callers

nothing calls this directly

Calls 3

hasKeyMethod · 0.45
getStringMethod · 0.45
setStringMethod · 0.45

Tested by

no test coverage detected