class_docstr: It is a rolling based on DDG-DA
  
  **NOTE**
  before running the example, please clean your previous results with following command
  - `rm -r mlruns`
class_docstr_tok: ["It","is","a","rolling","based","on","DDG-DA","*","*","NOTE","*","*","before","running","the","example",",","please","clean","your","previous","results","with","following","command","-","`","rm","-r","mlruns","`"]
docstr: Parameters
  ----------
  sim_task_model: Literal["linear", "gbdt"] = "gbdt",
      The model for calculating similarity between data.
  meta_1st_train_end: Optional[str]
      the datetime of training end of the first meta_task
  alpha: float
      Setting the L2 regularization for ridge
      The `alpha` is only passed to MetaModelDS (it is not passed to sim_task_model currently..)
docstr_tok: ["Parameters","--","--","--","--","--","sim_task_model",":","Literal","[","``","linear","''",",","``","gbdt","''","]","=","``","gbdt","''",",","The","model","for","calculating","similarity","between","data",".","meta_1st_train_end",":","Optional","[","str","]","the","datetime","of","training","end","of","the","first","meta_task","alpha",":","float","Setting","the","L2","regularization","for","ridge","The","`","alpha","`","is","only","passed","to","MetaModelDS","(","it","is","not","passed","to","sim_task_model","currently","..",")"]
code: def __init__(
      self,
      sim_task_model: UTIL_MODEL_TYPE = "gbdt",
      meta_1st_train_end: Optional[str] = None,
      alpha: float = 0.01,
      working_dir: Optional[Union[str, Path]] = None,
      **kwargs,
  ):
      """
  
      Parameters
      ----------
      sim_task_model: Literal["linear", "gbdt"] = "gbdt",
          The model for calculating similarity between data.
      meta_1st_train_end: Optional[str]
          the datetime of training end of the first meta_task
      alpha: float
          Setting the L2 regularization for ridge
          The `alpha` is only passed to MetaModelDS (it is not passed to sim_task_model currently..)
      """
      # NOTE:
      # the horizon must match the meaning in the base task template
      self.meta_exp_name = "DDG-DA"
      self.sim_task_model: UTIL_MODEL_TYPE = sim_task_model  # The model to capture the distribution of data.
      self.alpha = alpha
      self.meta_1st_train_end = meta_1st_train_end
      super().__init__(**kwargs)
      self.working_dir = (
          self.conf_path.parent
          if working_dir is None
          else Path(working_dir)
      )
      self.proxy_hd = self.working_dir / "handler_proxy.pkl"
  
imports: from pathlib import Path
  import pickle
  from typing import Optional, Union
  import pandas
  import yaml
  from qlib.contrib.meta.data_selection.dataset import InternalData, MetaDatasetDS
  from qlib.contrib.meta.data_selection.model import MetaModelDS
  from qlib.data.dataset.handler import DataHandlerLP
  from qlib.model.meta.task import MetaTask
  from qlib.model.trainer import TrainerR
  from qlib.typehint import Literal
  from qlib.utils import init_instance_by_config
  from qlib.workflow import R
  from qlib.workflow.task.utils import replace_task_handler_with_cache
  from .base import Rolling
label_desc: Use image node_id 1 to create a new DDGDA object from inherited base classes: Rolling with example: obj = DDGDA(sim_task_model, meta_1st_train_end, alpha, working_dir)