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
Loading
Please sign in to comment