MCPcopy Create free account
hub / github.com/pytorch/pytorch / pop_context

Method pop_context

torch/_dynamo/code_context.py:20–23  ·  view source on GitHub ↗
(self, code: types.CodeType)

Source from the content-addressed store, hash-verified

18 return ctx
19
20 def pop_context(self, code: types.CodeType):
21 ctx = self.get_context(code)
22 self.code_context._remove_id(id(code))
23 return ctx
24
25 def clear(self):
26 self.code_context.clear()

Callers

nothing calls this directly

Calls 2

get_contextMethod · 0.95
_remove_idMethod · 0.45

Tested by

no test coverage detected