class_docstr: Manage NNI experiment.
  
  You can either specify an :class:`ExperimentConfig` object, or a training service name.
  If a platform name is used, a blank config template for that training service will be generated.
  
  When configuration is completed, use :meth:`Experiment.run` to launch the experiment.
  
  Parameters
  ----------
  config_or_platform
      See :class:`~nni.experiment.config.ExperimentConfig`.
  id
      Experiment ID. If not specified, a random ID will be generated.
      If specified, the ID should be unique to avoid conflict with existing experiments.
      The only case when you need to specify an existing ID is when you want to resume an experiment.
  
  Example
  -------
  .. code-block::
  
      experiment = Experiment('remote')
      experiment.config.trial_command = 'python3 trial.py'
      experiment.config.machines.append(RemoteMachineConfig(ip=..., user_name=...))
      ...
      experiment.run(8080)
  
  Attributes
  ----------
  config
      Experiment configuration.
  id
      Experiment ID.
  port
      Web portal port. Or ``None`` if the experiment is not running.
class_docstr_tok: ["Manage","NNI","experiment",".","You","can","either","specify","an",":","class",":","`","ExperimentConfig","`","object",",","or","a","training","service","name",".","If","a","platform","name","is","used",",","a","blank","config","template","for","that","training","service","will","be","generated",".","When","configuration","is","completed",",","use",":","meth",":","`","Experiment.run","`","to","launch","the","experiment",".","Parameters","--","--","--","--","--","config_or_platform","See",":","class",":","`","~nni.experiment.config.ExperimentConfig","`",".","id","Experiment","ID",".","If","not","specified",",","a","random","ID","will","be","generated",".","If","specified",",","the","ID","should","be","unique","to","avoid","conflict","with","existing","experiments",".","The","only","case","when","you","need","to","specify","an","existing","ID","is","when","you","want","to","resume","an","experiment",".","Example","--","--","--","-","..","code-block",":",":","experiment","=","Experiment","(","'remote","'",")","experiment.config.trial_command","=","'python3","trial.py'","experiment.config.machines.append","(","RemoteMachineConfig","(","ip=","...",",","user_name=","...",")",")","...","experiment.run","(","8080",")","Attributes","--","--","--","--","--","config","Experiment","configuration",".","id","Experiment","ID",".","port","Web","portal","port",".","Or","``","None","``","if","the","experiment","is","not","running","."]
docstr: Load checkpoint from local file system.
  Restores the status of the experiment instance.
code: def load_checkpoint(self) -> None:
      """
      Load checkpoint from local file system.
      Restores the status of the experiment instance.
      """
      # HPO basically only needs to load the config.
  
      # In case the current experiment already has a config,
      # respect the new config's working directory.
      if self.config is not None:
          experiment_working_directory = (
              self.config.canonical_copy().experiment_working_directory
          )
      else:
          experiment_working_directory = None
  
      # Load the config regardless of whether current config is provided or not.
      config = launcher.get_stopped_experiment_config(
          self.id, exp_dir=experiment_working_directory
      )
  
      if self.config is not None:
          # If `self.config` is set, do some validation.
          from .config.utils import diff
  
          config_diff = diff(self.config, config, "Current", "Loaded")
          if config_diff:
              _logger.warning(
                  "Config is found but does not match the current config:\n%s",
                  config_diff,
              )
              _logger.warning(
                  "Current config will NOT be overridden by the loaded config."
              )
          else:
              _logger.info("Current config matches the loaded config.")
      else:
          # If `self.config` is not set, use the loaded config.
          _logger.debug(
              "Current config is None. Loaded config will be used: %r",
              config,
          )
          self.config = config
  
imports: from __future__ import annotations
  import atexit
  from enum import Enum
  import logging
  from pathlib import Path
  import socket
  from subprocess import Popen
  import time
  from typing import Any, cast
  import psutil
  from typing_extensions import Literal
  from nni.runtime.log import start_experiment_logging, stop_experiment_logging
  from nni.tools.nnictl.config_utils import Experiments
  from .config import ExperimentConfig
  from .data import TrialJob, TrialMetricData, TrialResult
  from .None import launcher
  from .None import management
  from .None import rest
  from ..tools.nnictl.command_utils import kill_command
label_desc: Use image node_id 13 for calling the Experiment obj's underlying member method code with example usage: obj.load_checkpoint() without return types