class_docstr: This example strategy always uses the latest rolling model sas online models.
class_docstr_tok: ["This","example","strategy","always","uses","the","latest","rolling","model","sas","online","models","."]
docstr: Get the instance of `Collector <../advanced/task_management.html#Task Collecting>`_ to collect results. The returned collector must distinguish results in different models.
  
  Assumption: the models can be distinguished based on the model name and rolling test segments.
  If you do not want this assumption, please implement your method or use another rec_key_func.
  
  Args:
      rec_key_func (Callable): a function to get the key of a recorder. If None, use recorder id.
      rec_filter_func (Callable, optional): filter the recorder by return True or False. Defaults to None.
      artifacts_key (List[str], optional): the artifacts key you want to get. If None, get all artifacts.
docstr_tok: ["Get","the","instance","of","`","Collector","<","..","\/advanced\/task_management.html","#","Task","Collecting",">","`","_","to","collect","results",".","The","returned","collector","must","distinguish","results","in","different","models",".","Assumption",":","the","models","can","be","distinguished","based","on","the","model","name","and","rolling","test","segments",".","If","you","do","not","want","this","assumption",",","please","implement","your","method","or","use","another","rec_key_func",".","Args",":","rec_key_func","(","Callable",")",":","a","function","to","get","the","key","of","a","recorder",".","If","None",",","use","recorder","id",".","rec_filter_func","(","Callable",",","optional",")",":","filter","the","recorder","by","return","True","or","False",".","Defaults","to","None",".","artifacts_key","(","List","[","str","]",",","optional",")",":","the","artifacts","key","you","want","to","get",".","If","None",",","get","all","artifacts","."]
code: def get_collector(
      self,
      process_list=[RollingGroup()],
      rec_key_func=None,
      rec_filter_func=None,
      artifacts_key=None,
  ):
      """
      Get the instance of `Collector <../advanced/task_management.html#Task Collecting>`_ to collect results. The returned collector must distinguish results in different models.
  
      Assumption: the models can be distinguished based on the model name and rolling test segments.
      If you do not want this assumption, please implement your method or use another rec_key_func.
  
      Args:
          rec_key_func (Callable): a function to get the key of a recorder. If None, use recorder id.
          rec_filter_func (Callable, optional): filter the recorder by return True or False. Defaults to None.
          artifacts_key (List[str], optional): the artifacts key you want to get. If None, get all artifacts.
      """
  
      def rec_key(recorder):
          task_config = recorder.load_object("task")
          model_key = task_config["model"]["class"]
          rolling_key = task_config["dataset"]["kwargs"]["segments"][
              "test"
          ]
          return model_key, rolling_key
  
      if rec_key_func is None:
          rec_key_func = rec_key
  
      artifacts_collector = RecorderCollector(
          experiment=self.exp_name,
          process_list=process_list,
          rec_key_func=rec_key_func,
          rec_filter_func=rec_filter_func,
          artifacts_key=artifacts_key,
      )
  
      return artifacts_collector
  
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 2 for calling the RollingStrategy obj's underlying member method code with example usage: obj.get_collector(process_list, rec_key_func, rec_filter_func, artifacts_key) and returns: artifacts_collector, model_key,  rolling_key