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

Method test_capture_assets

tensorflow/python/saved_model/load_test.py:254–265  ·  view source on GitHub ↗
(self, cycles)

Source from the content-addressed store, hash-verified

252 root.add(constant_op.constant(1.))
253
254 def test_capture_assets(self, cycles):
255 root = tracking.AutoTrackable()
256 root.vocab = tracking.TrackableAsset(self._make_asset("contents"))
257 root.f = def_function.function(
258 lambda: root.vocab.asset_path,
259 input_signature=[])
260 imported = cycle(root, cycles)
261 original_output = root.f().numpy()
262 imported_output = imported.f().numpy()
263 self.assertNotEqual(original_output, imported_output)
264 with open(imported_output, "r") as f:
265 self.assertEqual("contents", f.read())
266
267 def test_capture_assets_in_graph(self, cycles):
268 root = tracking.AutoTrackable()

Callers

nothing calls this directly

Calls 6

_make_assetMethod · 0.95
cycleFunction · 0.85
functionMethod · 0.45
numpyMethod · 0.45
fMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected