def get_config(self):
        """Returns the serializable config of the metric."""

        config = {
            "name": self.name,
            "dtype": self.dtype,
            "average": self.average,
            "beta": self.beta,
            "threshold": self.threshold,
        }

        base_config = super().get_config()
        return {**base_config, **config}
Returns the serializable config of the metric.
keras/src/metrics/f_score_metrics.py