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

Method __enter__

caffe2/python/context.py:84–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 return ctx_info.get_active(required=required)
83
84 def __enter__(self):
85 for cls in _get_managed_classes(self):
86 _context_registry().get(cls).enter(self)
87 return self
88
89 def __exit__(self, *args):
90 for cls in _get_managed_classes(self):

Callers

nothing calls this directly

Calls 4

_get_managed_classesFunction · 0.85
_context_registryFunction · 0.85
enterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected