When training a Transformers model with Keras, there are some library-specific callbacks available to automate common tasks:
autodoc KerasMetricCallback
autodoc PushToHubCallback