Skip to content

Commit 2a9f37f

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
Add MethodMeta to Python Program (#12656)
Summary: title Reviewed By: lucylq, cmt0 Differential Revision: D78592613
1 parent 6aa864e commit 2a9f37f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

runtime/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ def load_method(self, name: str) -> Optional[Method]:
126126
self._methods[name] = method
127127
return method
128128

129+
def metadata(self, method_name: str) -> MethodMeta:
130+
"""Gets the metadata for the specified method.
131+
132+
Args:
133+
method_name: The name of the method.
134+
135+
Returns:
136+
The outputs of the method.
137+
"""
138+
return self._program.method_meta(method_name)
139+
129140

130141
class BackendRegistry:
131142
"""The registry of backends that are available to the runtime."""

0 commit comments

Comments
 (0)