class_docstr: A harness for early stopping.
docstr: Write attributes to stopper from a summary dict.
docstr_tok: ["Write","attributes","to","stopper","from","a","summary","dict","."]
code: def _write_from_summary_dict(
      self,
      *,
      frequency: int,
      patience: int,
      remaining_patience: int,
      relative_delta: float,
      metric: str,
      larger_is_better: bool,
      results: List[float],
      stopped: bool,
      best_epoch: int,
      best_metric: float,
  ) -> None:
      """Write attributes to stopper from a summary dict."""
      self.frequency = frequency
      self.patience = patience
      self.relative_delta = relative_delta
      self.metric = metric
      self.larger_is_better = larger_is_better
      self.results = results
      self.stopped = stopped
      # TODO need a test that this all re-instantiates properly
      self._stopper = EarlyStoppingLogic(
          patience=patience,
          relative_delta=relative_delta,
          larger_is_better=larger_is_better,
      )
      self._stopper.best_epoch = best_epoch
      self._stopper.best_metric = best_metric
      self._stopper.remaining_patience = remaining_patience
  
imports: import dataclasses
  import logging
  import math
  import pathlib
  from dataclasses import dataclass
  from typing import Any, Callable, List, Mapping, Optional, Union
  from uuid import uuid4
  import torch
  from .stopper import Stopper
  from ..constants import PYKEEN_CHECKPOINTS
  from ..evaluation import Evaluator
  from ..models import Model
  from ..trackers import ResultTracker
  from ..triples import CoreTriplesFactory
  from ..utils import fix_dataclass_init_docs
label_desc: Use image node_id 9 for calling the EarlyStopper obj's underlying member method code with example usage: obj._write_from_summary_dict() without return types