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

Function wrapped_fn

tensorflow/contrib/learn/python/learn/datasets/base.py:201–214  ·  view source on GitHub ↗

The actual wrapper function that applies the retry logic.

(*args, **kwargs)

Source from the content-addressed store, hash-verified

199 """Wrapper function factory invoked by decorator magic."""
200
201 def wrapped_fn(*args, **kwargs):
202 """The actual wrapper function that applies the retry logic."""
203 for delay in delays():
204 try:
205 return fn(*args, **kwargs)
206 except Exception as e: # pylint: disable=broad-except
207 if is_retriable is None:
208 continue
209
210 if is_retriable(e):
211 time.sleep(delay)
212 else:
213 raise
214 return fn(*args, **kwargs)
215
216 return wrapped_fn
217

Callers 10

testRecomputeMethod · 0.85
callMethod · 0.85
bound_method_wrapperFunction · 0.85
testMakeVJPMethod · 0.85
testPersistentMakeVJPMethod · 0.85
testAddFunctionMethod · 0.85
test_partial_functionMethod · 0.85

Calls 3

delaysFunction · 0.85
fnFunction · 0.50
sleepMethod · 0.45

Tested by 8

testRecomputeMethod · 0.68
testMakeVJPMethod · 0.68
testPersistentMakeVJPMethod · 0.68
testAddFunctionMethod · 0.68
test_partial_functionMethod · 0.68