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

Method add_model

coremltools/models/utils.py:1522–1530  ·  view source on GitHub ↗

Insert all functions from the model in ``model_path`` into the multifunction descriptor. The function names will remain the same as in the original model.

(self, model_path: str)

Source from the content-addressed store, hash-verified

1520 self._name_to_source_function[target_function_name] = (model_path, src_function_name)
1521
1522 def add_model(self, model_path: str) -> None:
1523 """
1524 Insert all functions from the model in ``model_path`` into the multifunction descriptor.
1525 The function names will remain the same as in the original model.
1526 """
1527 self._add_modelpath_to_cache(model_path)
1528
1529 for func_name in self._modelpath_to_functions[model_path]:
1530 self.add_function(model_path, func_name, func_name)
1531
1532 def remove_function(self, function_name: str) -> None:
1533 """

Callers 2

test_add_modelMethod · 0.95
__init__Method · 0.95

Calls 2

add_functionMethod · 0.95

Tested by 1

test_add_modelMethod · 0.76