class_docstr: The central class for each experiment in Sacred.
  
  It manages the configuration, the main function, captured methods,
  observers, commands, and further ingredients.
  
  An Experiment instance should be created as one of the first
  things in any experiment-file.
class_docstr_tok: ["The","central","class","for","each","experiment","in","Sacred",".","It","manages","the","configuration",",","the","main","function",",","captured","methods",",","observers",",","commands",",","and","further","ingredients",".","An","Experiment","instance","should","be","created","as","one","of","the","first","things","in","any","experiment-file","."]
docstr: Create a new experiment with the given name and optional ingredients.
  
  Parameters
  ----------
  name
      Optional name of this experiment, defaults to the filename.
      (Required in interactive mode)
  
  ingredients : list[sacred.Ingredient], optional
      A list of ingredients to be used with this experiment.
  
  interactive
      If set to True will allow the experiment to be run in interactive
      mode (e.g. IPython or Jupyter notebooks).
      However, this mode is discouraged since it won't allow storing the
      source-code or reliable reproduction of the runs.
  
  base_dir
      Optional full path to the base directory of this experiment. This
      will set the scope for automatic source file discovery.
  
  additional_host_info
      Optional dictionary containing as keys the names of the pieces of
      host info you want to collect, and as
      values the functions collecting those pieces of information.
  
  save_git_info:
      Optionally save the git commit hash and the git state
      (clean or dirty) for all source files. This requires the GitPython
      package.
code: def __init__(
      self,
      name: Optional[str] = None,
      ingredients: Sequence[Ingredient] = (),
      interactive: bool = False,
      base_dir: Optional[PathType] = None,
      additional_host_info: Optional[List[HostInfoGetter]] = None,
      additional_cli_options: Optional[Sequence[CLIOption]] = None,
      save_git_info: bool = True,
  ):
      """
      Create a new experiment with the given name and optional ingredients.
  
      Parameters
      ----------
      name
          Optional name of this experiment, defaults to the filename.
          (Required in interactive mode)
  
      ingredients : list[sacred.Ingredient], optional
          A list of ingredients to be used with this experiment.
  
      interactive
          If set to True will allow the experiment to be run in interactive
          mode (e.g. IPython or Jupyter notebooks).
          However, this mode is discouraged since it won't allow storing the
          source-code or reliable reproduction of the runs.
  
      base_dir
          Optional full path to the base directory of this experiment. This
          will set the scope for automatic source file discovery.
  
      additional_host_info
          Optional dictionary containing as keys the names of the pieces of
          host info you want to collect, and as
          values the functions collecting those pieces of information.
  
      save_git_info:
          Optionally save the git commit hash and the git state
          (clean or dirty) for all source files. This requires the GitPython
          package.
      """
      self.additional_host_info = additional_host_info or []
      check_additional_host_info(self.additional_host_info)
      self.additional_cli_options = additional_cli_options or []
      self.all_cli_options = (
          gather_command_line_options() + self.additional_cli_options
      )
      caller_globals = inspect.stack()[1][0].f_globals
      if name is None:
          if interactive:
              raise RuntimeError(
                  "name is required in interactive mode."
              )
          mainfile = caller_globals.get("__file__")
          if mainfile is None:
              raise RuntimeError(
                  "No main-file found. Are you running in "
                  "interactive mode? If so please provide a "
                  "name and set interactive=True."
              )
          name = os.path.basename(mainfile)
          if name.endswith(".py"):
              name = name[:-3]
          elif name.endswith(".pyc"):
              name = name[:-4]
      super().__init__(
          path=name,
          ingredients=ingredients,
          interactive=interactive,
          base_dir=base_dir,
          _caller_globals=caller_globals,
          save_git_info=save_git_info,
      )
      self.default_command = None
      self.command(print_config, unobserved=True)
      self.command(print_dependencies, unobserved=True)
      self.command(save_config, unobserved=True)
      self.command(print_named_configs(self), unobserved=True)
      self.observers = []
      self.current_run = None
      self.captured_out_filter = None
      """Filter function to be applied to captured output of a run"""
      self.option_hooks = []
  
imports: import inspect
  import os.path
  import sys
  import warnings
  from collections import OrderedDict
  from typing import Sequence, Optional, List
  from docopt import docopt, printable_usage
  from sacred import SETTINGS
  from sacred.arg_parser import format_usage, get_config_updates
  from sacred import commandline_options
  from sacred.commandline_options import CLIOption
  from sacred.commands import help_for_command, print_config, print_dependencies, save_config, print_named_configs
  from sacred.observers.file_storage import file_storage_option
  from sacred.observers.s3_observer import s3_option
  from sacred.config.signature import Signature
  from sacred.ingredient import Ingredient
  from sacred.initialize import create_run
  from sacred.observers.sql import sql_option
  from sacred.observers.tinydb_hashfs import tiny_db_option
  from sacred.run import Run
  from sacred.host_info import check_additional_host_info, HostInfoGetter
  from sacred.utils import print_filtered_stacktrace, ensure_wellformed_argv, SacredError, format_sacred_error, PathType, get_inheritors
  from sacred.observers.mongo import mongo_db_option
label_desc: Use image node_id 1 to create a new Experiment object from inherited base classes: Ingredient with example: obj = Experiment(name, ingredients, interactive, base_dir, additional_host_info, additional_cli_options, save_git_info)