MCPcopy Create free account
hub / github.com/pytorch/executorch / load_method

Method load_method

runtime/__init__.py:183–197  ·  view source on GitHub ↗

Loads a method from the program. Args: name: The name of the method to load. Returns: The loaded method.

(self, name: str)

Source from the content-addressed store, hash-verified

181 return set(self._methods.keys())
182
183 def load_method(self, name: str) -> Optional[Method]:
184 """Loads a method from the program.
185
186 Args:
187 name: The name of the method to load.
188
189 Returns:
190 The loaded method.
191 """
192
193 method = self._methods[name]
194 if method is None:
195 method = Method(self._program.load_method(name))
196 self._methods[name] = method
197 return method
198
199 def metadata(self, method_name: str) -> MethodMeta:
200 """Gets the metadata for the specified method without loading it.

Callers 15

_test_pass_e2eMethod · 0.80
_run_and_compareMethod · 0.80
run_executorch_testMethod · 0.80
run_inferenceFunction · 0.80
run_whisper_inferenceFunction · 0.80
execute_layer_testMethod · 0.80

Calls 1

MethodClass · 0.85