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

Function wrapper

tensorflow/python/autograph/impl/api.py:227–239  ·  view source on GitHub ↗

Wrapper that calls the converted version of f.

(*args, **kwargs)

Source from the content-addressed store, hash-verified

225 """Decorator implementation."""
226
227 def wrapper(*args, **kwargs):
228 """Wrapper that calls the converted version of f."""
229 options = converter.ConversionOptions(
230 recursive=recursive,
231 user_requested=user_requested,
232 optional_features=optional_features)
233 try:
234 return converted_call(f, options, args, kwargs)
235 except Exception as e: # pylint:disable=broad-except
236 if hasattr(e, 'ag_error_metadata'):
237 raise e.ag_error_metadata.to_exception(e)
238 else:
239 raise
240
241 if inspect.isfunction(f) or inspect.ismethod(f):
242 wrapper = functools.update_wrapper(wrapper, f)

Callers

nothing calls this directly

Calls 3

converted_callFunction · 0.85
to_exceptionMethod · 0.80
funcFunction · 0.50

Tested by

no test coverage detected