docstr: Attempt to restore everything at once from a 'PyTorch-Lightning checkpoint' file through file-read and
  state-restore, in this priority:
  
  1. from HPC weights if found
  2. from `checkpoint_path` file if provided
  3. don't restore
  
  All restored states are listed in return value description of `dump_checkpoint`.
  
  Args:
      checkpoint_path: Path to a PyTorch Lightning checkpoint file.
docstr_tok: ["Attempt","to","restore","everything","at","once","from","a","'PyTorch-Lightning","checkpoint","'","file","through","file-read","and","state-restore",",","in","this","priority",":","1.","from","HPC","weights","if","found","2.","from","`","checkpoint_path","`","file","if","provided","3.","do","n't","restore","All","restored","states","are","listed","in","return","value","description","of","`","dump_checkpoint","`",".","Args",":","checkpoint_path",":","Path","to","a","PyTorch","Lightning","checkpoint","file","."]
code: def restore(self, checkpoint_path: Optional[_PATH] = None) -> None:
      """Attempt to restore everything at once from a 'PyTorch-Lightning checkpoint' file through file-read and
      state-restore, in this priority:
  
      1. from HPC weights if found
      2. from `checkpoint_path` file if provided
      3. don't restore
  
      All restored states are listed in return value description of `dump_checkpoint`.
  
      Args:
          checkpoint_path: Path to a PyTorch Lightning checkpoint file.
  
      """
      self.resume_start(checkpoint_path)
  
      # restore module states
      self.restore_datamodule()
      self.restore_model()
  
      # restore callback states
      self.restore_callbacks()
  
      # restore training state
      self.restore_training_state()
      self.resume_end()
  
imports: import logging
  import os
  import re
  from typing import Any, Dict, Optional
  import torch
  from fsspec.core import url_to_fs
  from fsspec.implementations.local import LocalFileSystem
  from torch import Tensor
  import lightning.pytorch
  from lightning.fabric.plugins.environments.slurm import SLURMEnvironment
  from lightning.fabric.utilities.cloud_io import _is_dir, get_filesystem
  from lightning.fabric.utilities.types import _PATH
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.plugins.precision import MixedPrecision
  from lightning.pytorch.trainer import call
  from lightning.pytorch.trainer.states import TrainerFn
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.imports import _OMEGACONF_AVAILABLE
  from lightning.pytorch.utilities.migration import pl_legacy_patch
  from lightning.pytorch.utilities.migration.utils import _pl_migrate_checkpoint
  from lightning.pytorch.utilities.rank_zero import rank_zero_info, rank_zero_warn
label_desc: Use image node_id 7 for calling the _CheckpointConnector obj's underlying member method code with example usage: obj.restore(checkpoint_path) without return types