class_docstr: Represent and manage a single run of an experiment.
class_docstr_tok: ["Represent","and","manage","a","single","run","of","an","experiment","."]
docstr: Start this run.
  
  Parameters
  ----------
  \*args
      parameters passed to the main function
  
  Returns
  -------
      the return value of the main function
docstr_tok: ["Start","this","run",".","Parameters","--","--","--","--","--","\\","*","args","parameters","passed","to","the","main","function","Returns","--","--","--","-","the","return","value","of","the","main","function"]
code: def __call__(self, *args):
      r"""Start this run.
  
      Parameters
      ----------
      \*args
          parameters passed to the main function
  
      Returns
      -------
          the return value of the main function
  
      """
      if self.start_time is not None:
          raise RuntimeError(
              "A run can only be started once. "
              "(Last start was {})".format(self.start_time)
          )
  
      if self.unobserved:
          self.observers = []
      else:
          self.observers = sorted(
              self.observers, key=lambda x: -x.priority
          )
  
      self.warn_if_unobserved()
      set_global_seed(self.config["seed"])
  
      if self.capture_mode is None and not self.observers:
          capture_mode = "no"
      else:
          capture_mode = self.capture_mode
      capture_mode, capture_stdout = get_stdcapturer(capture_mode)
      self.run_logger.debug('Using capture mode "%s"', capture_mode)
  
      if self.queue_only:
          self._emit_queued()
          return
      try:
          with capture_stdout() as self._output_file:
              self._emit_started()
              self._start_heartbeat()
              self._execute_pre_run_hooks()
              self.result = self.main_function(*args)
              self._execute_post_run_hooks()
              if self.result is not None:
                  self.run_logger.info("Result: {}".format(self.result))
              elapsed_time = self._stop_time()
              self.run_logger.info("Completed after %s", elapsed_time)
              self._get_captured_output()
          self._stop_heartbeat()
          self._emit_completed(self.result)
      except (SacredInterrupt, KeyboardInterrupt) as e:
          self._stop_heartbeat()
          status = getattr(e, "STATUS", "INTERRUPTED")
          self._emit_interrupted(status)
          raise
      except BaseException:
          exc_type, exc_value, trace = sys.exc_info()
          self._stop_heartbeat()
          self._emit_failed(exc_type, exc_value, trace.tb_next)
          raise
      finally:
          self._warn_about_failed_observers()
          self._wait_for_observers()
  
      return self.result
  
imports: import datetime
  import os.path
  import sys
  import traceback
  from sacred import metrics_logger, SETTINGS
  from sacred.metrics_logger import linearize_metrics
  from sacred.randomness import set_global_seed
  from sacred.utils import SacredInterrupt, join_paths, IntervalTimer
  from sacred.stdout_capturing import get_stdcapturer
label_desc: Use image node_id 5 for calling the Run obj's underlying member method code with example usage: obj.__call__() and returns: self