class_docstr: OnlineStrategy is working with `Online Manager <#Online Manager>`_, responding to how the tasks are generated, the models are updated and signals are prepared.
class_docstr_tok: ["OnlineStrategy","is","working","with","`","Online","Manager","<","#","Online","Manager",">","`","_",",","responding","to","how","the","tasks","are","generated",",","the","models","are","updated","and","signals","are","prepared","."]
docstr: Get the instance of `Collector <../advanced/task_management.html#Task Collecting>`_ to collect different results of this strategy.
  
  For example:
      1) collect predictions in Recorder
      2) collect signals in a txt file
  
  Returns:
      Collector
docstr_tok: ["Get","the","instance","of","`","Collector","<","..","\/advanced\/task_management.html","#","Task","Collecting",">","`","_","to","collect","different","results","of","this","strategy",".","For","example",":","1",")","collect","predictions","in","Recorder","2",")","collect","signals","in","a","txt","file","Returns",":","Collector"]
code: def get_collector(self) -> Collector:
      """
      Get the instance of `Collector <../advanced/task_management.html#Task Collecting>`_ to collect different results of this strategy.
  
      For example:
          1) collect predictions in Recorder
          2) collect signals in a txt file
  
      Returns:
          Collector
      """
      raise NotImplementedError(
          f"Please implement the `get_collector` method."
      )
  
imports: from typing import List, Union
  from qlib.log import get_module_logger
  from qlib.model.ens.group import RollingGroup
  from qlib.utils import transform_end_date
  from qlib.workflow.online.utils import OnlineTool, OnlineToolR
  from qlib.workflow.recorder import Recorder
  from qlib.workflow.task.collect import Collector, RecorderCollector
  from qlib.workflow.task.gen import RollingGen, task_generator
  from qlib.workflow.task.utils import TimeAdjuster
label_desc: Use image node_id 5 for calling the OnlineStrategy obj's underlying member method code with example usage: obj.get_collector() without return types