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: Check whether a checkpoint of current experiment ID exists.
  
  Returns
  -------
  ``True`` if checkpoint is found; ``False`` otherwise.
code: def has_checkpoint(self) -> bool:
      """
      Check whether a checkpoint of current experiment ID exists.
  
      Returns
      -------
      ``True`` if checkpoint is found; ``False`` otherwise.
      """
      # First check whether a checkpoint exists.
      experiments_dict = Experiments().get_all_experiments()
      if self.id in experiments_dict:
          _logger.debug(
              "Checkpoint is found in experiment manifest. The experiment can be resumed: %r",
              experiments_dict[self.id],
          )
          return True
      else:
          _logger.debug(
              "No checkpoint with %s is found in experiment manifest.",
              self.id,
          )
          return False
  
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 12 for calling the Experiment obj's underlying member method code with example usage: obj.has_checkpoint() and returns: True, False