MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / insert

Method insert

tensorflow/python/ops/script_ops.py:166–171  ·  view source on GitHub ↗

Registers `func` and returns a unique token for this entry.

(self, func)

Source from the content-addressed store, hash-verified

164 return context.context()._handle # pylint: disable=protected-access
165
166 def insert(self, func):
167 """Registers `func` and returns a unique token for this entry."""
168 token = self._next_unique_token()
169 # Store a weakref to the function
170 self._funcs[token] = func
171 return token
172
173 def remove(self, token):
174 """Removes the registered function corresponding to `token`."""

Callers 12

RecordRunMethod · 0.45
_internal_py_funcFunction · 0.45
_add_to_stackMethod · 0.45
AddAttrForArgMethod · 0.45
CodeMethod · 0.45
CodeMethod · 0.45
visit_FunctionDefMethod · 0.45
CachedLookupMethod · 0.45

Calls 1

_next_unique_tokenMethod · 0.95

Tested by

no test coverage detected