class_docstr: Utility class that provides methods to save and load stateful attributes to disk.
docstr: Load the detector's state from disk, in order to restart from a checkpoint previously generated with
  `save_state`.
  
  Parameters
  ----------
  filepath
      The directory to load state from.
docstr_tok: ["Load","the","detector","'s","state","from","disk",",","in","order","to","restart","from","a","checkpoint","previously","generated","with","`","save_state","`",".","Parameters","--","--","--","--","--","filepath","The","directory","to","load","state","from","."]
code: def load_state(self, filepath: Union[str, os.PathLike]):
      """
      Load the detector's state from disk, in order to restart from a checkpoint previously generated with
      `save_state`.
  
      Parameters
      ----------
      filepath
          The directory to load state from.
      """
      self._set_state_dir(filepath)
      suffix = (
          ".pt"
          if hasattr(self, "backend")
          and self.backend == Framework.PYTORCH
          else ".npz"
      )
      _load_state_dict(
          self,
          self.state_dir.joinpath("state" + suffix),
          raise_error=True,
      )
      logger.info(
          "State loaded for t={} from {}".format(self.t, self.state_dir)
      )
  
file_path: alibi-detect/alibi_detect/utils/state/state.py
imports: import os
  from pathlib import Path
  import logging
  from abc import ABC
  from typing import Union, Tuple
  import numpy
  from alibi_detect.utils.frameworks import Framework
  from alibi_detect.utils.state._pytorch import save_state_dict, load_state_dict
label_desc: Use image node_id 3 for calling the StateMixin obj's underlying member method code with example usage: obj.load_state(filepath) without return types