class_docstr: OnlineManager can manage online models with `Online Strategy <#Online Strategy>`_.
  It also provides a history recording of which models are online at what time.
docstr: Init OnlineManager.
  One OnlineManager must have at least one OnlineStrategy.
  
  Args:
      strategies (Union[OnlineStrategy, List[OnlineStrategy]]): an instance of OnlineStrategy or a list of OnlineStrategy
      begin_time (Union[str,pd.Timestamp], optional): the OnlineManager will begin at this time. Defaults to None for using the latest date.
      trainer (qlib.model.trainer.Trainer): the trainer to train task. None for using TrainerR.
      freq (str, optional): data frequency. Defaults to "day".
docstr_tok: ["Init","OnlineManager",".","One","OnlineManager","must","have","at","least","one","OnlineStrategy",".","Args",":","strategies","(","Union","[","OnlineStrategy",",","List","[","OnlineStrategy","]","]",")",":","an","instance","of","OnlineStrategy","or","a","list","of","OnlineStrategy","begin_time","(","Union","[","str",",","pd.Timestamp","]",",","optional",")",":","the","OnlineManager","will","begin","at","this","time",".","Defaults","to","None","for","using","the","latest","date",".","trainer","(","qlib.model.trainer.Trainer",")",":","the","trainer","to","train","task",".","None","for","using","TrainerR",".","freq","(","str",",","optional",")",":","data","frequency",".","Defaults","to","``","day","''","."]
code: def __init__(
      self,
      strategies: Union[OnlineStrategy, List[OnlineStrategy]],
      trainer: Trainer = None,
      begin_time: Union[str, pd.Timestamp] = None,
      freq="day",
  ):
      """
      Init OnlineManager.
      One OnlineManager must have at least one OnlineStrategy.
  
      Args:
          strategies (Union[OnlineStrategy, List[OnlineStrategy]]): an instance of OnlineStrategy or a list of OnlineStrategy
          begin_time (Union[str,pd.Timestamp], optional): the OnlineManager will begin at this time. Defaults to None for using the latest date.
          trainer (qlib.model.trainer.Trainer): the trainer to train task. None for using TrainerR.
          freq (str, optional): data frequency. Defaults to "day".
      """
      self.logger = get_module_logger(self.__class__.__name__)
      if not isinstance(strategies, list):
          strategies = [strategies]
      self.strategies = strategies
      self.freq = freq
      if begin_time is None:
          begin_time = D.calendar(freq=self.freq).max()
      self.begin_time = pd.Timestamp(begin_time)
      self.cur_time = self.begin_time
      # OnlineManager will recorder the history of online models, which is a dict like {pd.Timestamp, {strategy, [online_models]}}.
      # It records the online servnig models of each strategy for each day.
      self.history = {}
      if trainer is None:
          trainer = TrainerR()
      self.trainer = trainer
      self.signals = None
      self.status = self.STATUS_ONLINE
  
imports: import logging
  from typing import Callable, List, Union
  import pandas
  from qlib import get_module_logger
  from qlib.data.data import D
  from qlib.log import set_global_logger_level
  from qlib.model.ens.ensemble import AverageEnsemble
  from qlib.model.trainer import Trainer, TrainerR
  from qlib.utils.serial import Serializable
  from qlib.workflow.online.strategy import OnlineStrategy
  from qlib.workflow.task.collect import MergeCollector
label_desc: Use image node_id 1 to create a new OnlineManager object from inherited base classes: Serializable with example: obj = OnlineManager(strategies, trainer, begin_time, freq)