MCPcopy Index your code
hub / github.com/pytorch/pytorch / GetContentFromProto

Function GetContentFromProto

caffe2/python/utils.py:219–224  ·  view source on GitHub ↗

Gets a specific field from a protocol buffer that matches the given class

(obj, function_map)

Source from the content-addressed store, hash-verified

217
218
219def GetContentFromProto(obj, function_map):
220 """Gets a specific field from a protocol buffer that matches the given class
221 """
222 for cls, func in function_map.items():
223 if type(obj) is cls:
224 return func(obj)
225
226
227def GetContentFromProtoString(s, function_map):

Callers

nothing calls this directly

Calls 2

funcFunction · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…