MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / map_leaf

Method map_leaf

python/oneflow/framework/args_tree.py:264–275  ·  view source on GitHub ↗

r""" Map the leaf of the arguments into map_function(leaf).

(self, map_function: Callable)

Source from the content-addressed store, hash-verified

262 return self._execute_mapping(self._io_args, map_function)
263
264 def map_leaf(self, map_function: Callable):
265 r"""
266 Map the leaf of the arguments into map_function(leaf).
267 """
268 assert map_function != None, "map function cannot be None"
269
270 if self._gen_name:
271 args_to_map = self._named_io_args
272 else:
273 args_to_map = self._io_args
274
275 return self._execute_mapping(args_to_map, map_function)
276
277 def _execute_mapping(self, value, map_function):
278 if _is_raw_type(value, tuple) or _is_raw_type(value, list):

Callers 15

wrapped_forwardFunction · 0.95
process_inputFunction · 0.95
process_outputFunction · 0.95
to_globalFunction · 0.95
to_localFunction · 0.95
fnMethod · 0.95
__build_ioMethod · 0.95
__map_ioMethod · 0.95
__map_io_liteMethod · 0.95
__map_ioMethod · 0.95

Calls 1

_execute_mappingMethod · 0.95

Tested by 1

fnMethod · 0.76