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

Function _get_scaffold

tensorflow/contrib/compiler/xla.py:51–63  ·  view source on GitHub ↗

Retrieves the Scaffold from `captured_scaffold_fn`.

(captured_scaffold_fn)

Source from the content-addressed store, hash-verified

49
50
51def _get_scaffold(captured_scaffold_fn):
52 """Retrieves the Scaffold from `captured_scaffold_fn`."""
53 scaffold_fn = captured_scaffold_fn.get()
54
55 if not scaffold_fn:
56 return None
57
58 scaffold = scaffold_fn()
59 if scaffold is None:
60 raise ValueError(
61 'TPUEstimatorSpec.scaffold_fn returns None, which is not allowed')
62
63 return scaffold
64
65
66class _ModelFnWrapper(object):

Callers 1

__call__Method · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected