code: def __init__(
      self,
      provider_uri="~/.qlib/qlib_data/cn_data",
      region="cn",
      trainer=DelayTrainerRM(),  # you can choose from TrainerR, TrainerRM, DelayTrainerR, DelayTrainerRM
      task_url="mongodb://10.0.0.4:27017/",  # not necessary when using TrainerR or DelayTrainerR
      task_db_name="rolling_db",  # not necessary when using TrainerR or DelayTrainerR
      rolling_step=550,
      tasks=None,
      add_tasks=None,
  ):
      if add_tasks is None:
          add_tasks = [CSI100_RECORD_LGB_TASK_CONFIG_ROLLING]
      if tasks is None:
          tasks = [CSI100_RECORD_XGBOOST_TASK_CONFIG_ROLLING]
      mongo_conf = {
          "task_url": task_url,  # your MongoDB url
          "task_db_name": task_db_name,  # database name
      }
      qlib.init(
          provider_uri=provider_uri, region=region, mongo=mongo_conf
      )
      self.tasks = tasks
      self.add_tasks = add_tasks
      self.rolling_step = rolling_step
      strategies = []
      for task in tasks:
          name_id = task["model"][
              "class"
          ]  # NOTE: Assumption: The model class can specify only one strategy
          strategies.append(
              RollingStrategy(
                  name_id,
                  task,
                  RollingGen(
                      step=rolling_step, rtype=RollingGen.ROLL_SD
                  ),
              )
          )
      self.trainer = trainer
      self.rolling_online_manager = OnlineManager(
          strategies, trainer=self.trainer
      )
  
file_path: qlib/examples/online_srv/rolling_online_management.py
imports: import os
  import fire
  import qlib
  from qlib.model.trainer import DelayTrainerR, DelayTrainerRM, TrainerR, TrainerRM, end_task_train, task_train
  from qlib.workflow import R
  from qlib.workflow.online.strategy import RollingStrategy
  from qlib.workflow.task.gen import RollingGen
  from qlib.workflow.online.manager import OnlineManager
  from qlib.tests.config import CSI100_RECORD_XGBOOST_TASK_CONFIG_ROLLING, CSI100_RECORD_LGB_TASK_CONFIG_ROLLING
  from qlib.workflow.task.manage import TaskManager
label_desc: Use image node_id 1 to create a new RollingOnlineExample object  with example: obj = RollingOnlineExample(provider_uri, region, trainer, task_url, task_db_name, rolling_step, tasks, add_tasks)