    def load_state_dict(self, state_dict: Dict[str, Any]) -> None:
        """
        A `Trainer` can use this to hydrate a metric tracker from a serialized state.
        """
        self._best_so_far = state_dict["best_so_far"]
        self._epochs_with_no_improvement = state_dict["epochs_with_no_improvement"]
        self._is_best_so_far = state_dict["is_best_so_far"]
        self._epoch_number = state_dict["epoch_number"]
        self.best_epoch = state_dict["best_epoch"]

        # Even though we don't promise backwards compatibility for the --recover flag,
        # it's particularly easy and harmless to provide it here, so we do it.
        self.best_epoch_metrics = state_dict.get("best_epoch_metrics", {})
A `Trainer` can use this to hydrate a metric tracker from a serialized state.
allennlp/training/metric_tracker.py