Commit 6068ebcb authored by William Chargin's avatar William Chargin Committed by TensorFlower Gardener
Browse files

Remove mocks from Keras callback tests

The Keras callback tests currently mock out the summary APIs to capture
the names of summaries that the callback emits. But these mocks are
brittle, and will break when we update to the v2 file writer creation
logic. As of this change, the test simply writes out summaries and reads
them back in.

Tested:
Existing tests pass. After modifying the callback implementation to call
`create_file_writer_v2` instead of `create_file_writer`, the tests still
pass; before this change, they would have failed with

    KeyError: <tf.Tensor: id=8666, shape=(), dtype=resource, numpy=<unprintable>>

when trying to look up the summary writer resource in the mock map.

PiperOrigin-RevId: 236035285
parent e115ee58
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment