Tensorflow object has no attribute _keras_history

AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute '_keras_history disappears if we dont’t use eager execution inside the metric, fine if we use it inside the model. That is tf.config.experimental_run_functions_eagerly(False) inside metrics.py solves this, but model.run_eagerly=True is fine.

https://github.com/tensorflow/addons/pull/377 re output_masks and it being blocked

tf.keras vs tf.python.keras

tensorflow - What is the difference between tf.keras and tf.python.keras? - Stack Overflow