code: def __init__(self, config, TUNER_CONFIG_MANAGER):
      self.report_type = config.get("report_type", "pred_long")
      if self.report_type not in [
          "pred_long",
          "pred_long_short",
          "pred_short",
          "excess_return_without_cost",
          "excess_return_with_cost",
          "model",
      ]:
          raise ValueError(
              "report_type should be one of pred_long, pred_long_short, pred_short, excess_return_without_cost, excess_return_with_cost and model"
          )
  
      self.report_factor = config.get(
          "report_factor", "information_ratio"
      )
      if self.report_factor not in [
          "annualized_return",
          "information_ratio",
          "max_drawdown",
          "mean",
          "std",
          "model_score",
          "model_pearsonr",
      ]:
          raise ValueError(
              "report_factor should be one of annualized_return, information_ratio, max_drawdown, mean, std, model_pearsonr and model_score"
          )
  
      self.optim_type = config.get("optim_type", "max")
      if self.optim_type not in ["min", "max", "correlation"]:
          raise ValueError(
              "optim_type should be min, max or correlation"
          )
  
file_path: qlib/qlib/contrib/tuner/config.py
imports: import yaml
  import copy
  import os
label_desc: Use image node_id 1 to create a new OptimizationConfig object  with example: obj = OptimizationConfig(config, TUNER_CONFIG_MANAGER)