class_docstr: The implementation of OnlineTool based on (R)ecorder.
class_docstr_tok: ["The","implementation","of","OnlineTool","based","on","(","R",")","ecorder","."]
docstr: Update the predictions of online models to to_date.
  
  Args:
      to_date (pd.Timestamp): the pred before this date will be updated. None for updating to latest time in Calendar.
      exp_name (str): the experiment name. If None, then use default_exp_name.
docstr_tok: ["Update","the","predictions","of","online","models","to","to_date",".","Args",":","to_date","(","pd.Timestamp",")",":","the","pred","before","this","date","will","be","updated",".","None","for","updating","to","latest","time","in","Calendar",".","exp_name","(","str",")",":","the","experiment","name",".","If","None",",","then","use","default_exp_name","."]
code: def update_online_pred(
      self, to_date=None, from_date=None, exp_name: str = None
  ):
      """
      Update the predictions of online models to to_date.
  
      Args:
          to_date (pd.Timestamp): the pred before this date will be updated. None for updating to latest time in Calendar.
          exp_name (str): the experiment name. If None, then use default_exp_name.
      """
      exp_name = self._get_exp_name(exp_name)
      online_models = self.online_models(exp_name=exp_name)
      for rec in online_models:
          try:
              updater = PredUpdater(
                  rec, to_date=to_date, from_date=from_date
              )
          except LoadObjectError as e:
              # skip the recorder without pred
              self.logger.warn(
                  f"An exception `{str(e)}` happened when load `pred.pkl`, skip it."
              )
              continue
          updater.update()
  
      self.logger.info(
          f"Finished updating {len(online_models)} online model predictions of {exp_name}."
      )
  
imports: from typing import List, Union
  from qlib.log import get_module_logger
  from qlib.utils.exceptions import LoadObjectError
  from qlib.workflow.online.update import PredUpdater
  from qlib.workflow.recorder import Recorder
  from qlib.workflow.task.utils import list_recorders
label_desc: Use image node_id 6 for calling the OnlineToolR obj's underlying member method code with example usage: obj.update_online_pred(to_date, from_date, exp_name) without return types