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

Method __call__

tensorflow/tools/common/public_api.py:119–141  ·  view source on GitHub ↗

Visitor interface, see `traverse` for details.

(self, path, parent, children)

Source from the content-addressed store, hash-verified

117 name in self._do_not_descend_map[path])
118
119 def __call__(self, path, parent, children):
120 """Visitor interface, see `traverse` for details."""
121
122 # Avoid long waits in cases of pretty unambiguous failure.
123 if tf_inspect.ismodule(parent) and len(path.split('.')) > 10:
124 raise RuntimeError('Modules nested too deep:\n%s.%s\n\nThis is likely a '
125 'problem with an accidental public import.' %
126 (self._root_name, path))
127
128 # Includes self._root_name
129 full_path = '.'.join([self._root_name, path]) if path else self._root_name
130
131 # Remove things that are not visible.
132 for name, child in list(children):
133 if self._is_private(full_path, name, child):
134 children.remove((name, child))
135
136 self._visitor(path, parent, children)
137
138 # Remove things that are visible, but which should not be descended into.
139 for name, child in list(children):
140 if self._do_not_descend(full_path, name):
141 children.remove((name, child))

Callers

nothing calls this directly

Calls 5

_is_privateMethod · 0.95
_do_not_descendMethod · 0.95
splitMethod · 0.45
joinMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected