docstr: Initialize the Orchestrator of an experiment.
  
  Parameters
  ----------
  config_file : pathlib.Path
      Path to the configuration file.
  default_fields : Iterable[str], optional
      Default fields to include in the configuration, by default ("methods",
      "datasets").
  save_artifacts : bool, optional
      Whether to save artifacts, by default True.
  save_folder : numpy.ndarray, optional
      Path to the folder where artifacts will be saved, by default None.
  artifacts : numpy.ndarray, optional
      Artifacts to save, by default ("results", "methods", "predictions").
docstr_tok: ["Initialize","the","Orchestrator","of","an","experiment",".","Parameters","--","--","--","--","--","config_file",":","pathlib.Path","Path","to","the","configuration","file",".","default_fields",":","Iterable","[","str","]",",","optional","Default","fields","to","include","in","the","configuration",",","by","default","(","``","methods","''",",","``","datasets","''",")",".","save_artifacts",":","bool",",","optional","Whether","to","save","artifacts",",","by","default","True",".","save_folder",":","numpy.ndarray",",","optional","Path","to","the","folder","where","artifacts","will","be","saved",",","by","default","None",".","artifacts",":","numpy.ndarray",",","optional","Artifacts","to","save",",","by","default","(","``","results","''",",","``","methods","''",",","``","predictions","''",")","."]
code: def __init__(
      self,
      config_file: Optional[Path] = None,
      config: Optional[DictConfig] = None,
      default_fields: Iterable[str] = ("methods", "datasets"),
      save_artifacts: bool = True,
      save_folder: Optional[Path] = Path("artifacts"),
      artifacts: Iterable[str] = ("results", "methods", "predictions"),
  ):
      """
      Initialize the Orchestrator of an experiment.
  
      Parameters
      ----------
      config_file : pathlib.Path
          Path to the configuration file.
      default_fields : Iterable[str], optional
          Default fields to include in the configuration, by default ("methods",
          "datasets").
      save_artifacts : bool, optional
          Whether to save artifacts, by default True.
      save_folder : numpy.ndarray, optional
          Path to the folder where artifacts will be saved, by default None.
      artifacts : numpy.ndarray, optional
          Artifacts to save, by default ("results", "methods", "predictions").
      """
      # Initialize logger
      self.logger = create_logger("Experiment")
      self.logger.info("Instantiating Experiment class.")
  
      # Read config file
      if config is not None:
          self.config = config
      elif config_file is not None:
          self.config_reader = ConfigReader(
              config_file, default_fields=default_fields
          )
          self.config = self.config_reader.config
      else:
          raise ValueError("Missing configuration file")
  
      # Check if optimization parameters are provided
      if not hasattr(self.config, "optimization"):
          raise ValueError(
              "Provide optimization parameters in the config file."
          )
  
      # Debug log the benchmark config
      self.logger.debug(f"Experiment config: {self.config}")
  
      # Initialize dataset storage for the experiment
      self.datasets: dict = {}
  
      # Set artifacts to save
      if save_artifacts:
          self.artifacts = tuple(
              set(self.POSSIBLE_ARTIFACTS) & set(artifacts)
          )
      else:
          self.artifacts = None
  
      # Instantiate sampler object
      self.sampler = self._instantiate_sampler()
      self.save_folder = save_folder
      self.hash: str = ""
  
imports: import datetime
  import hashlib
  import json
  import pickle
  from pathlib import Path
  from typing import Iterable, Optional, Tuple, Union
  from hpt import OptunaTuner
  from omegaconf import DictConfig, ListConfig
  from optuna.samplers import BaseSampler
  from ..datasets.dataset import Dataset
  from ..methods.inprocessing.inprocessing import InProcessing
  from ..methods.postprocessing.identity import Identity
  from ..methods.postprocessing.postprocessing import PostProcessing
  from ..methods.postprocessing.threshold import Threshold
  from ..methods.preprocessing.identity import Identity
  from ..methods.preprocessing.preprocessing import PreProcessing
  from ..optimization import ObjectiveFunction
  from ..utils import ConfigReader, create_logger, import_object
label_desc: Use image node_id 1 to create a new Experiment object  with example: obj = Experiment(config_file, config, default_fields, save_artifacts, save_folder, artifacts)