class_docstr: A delayed implementation based on TrainerRM, which means `train` method may only do some preparation and `end_train` method can do the real model fitting.
class_docstr_tok: ["A","delayed","implementation","based","on","TrainerRM",",","which","means","`","train","`","method","may","only","do","some","preparation","and","`","end_train","`","method","can","do","the","real","model","fitting","."]
docstr: Given a list of Recorder and return a list of trained Recorder.
  This class will finish real data loading and model fitting.
  
  Args:
      recs (list): a list of Recorder, the tasks have been saved to them.
      end_train_func (Callable, optional): the end_train method which need at least `recorders` and `experiment_name`. Defaults to None for using self.end_train_func.
      experiment_name (str): the experiment name, None for use default name.
      kwargs: the params for end_train_func.
  
  Returns:
      List[Recorder]: a list of Recorders
docstr_tok: ["Given","a","list","of","Recorder","and","return","a","list","of","trained","Recorder",".","This","class","will","finish","real","data","loading","and","model","fitting",".","Args",":","recs","(","list",")",":","a","list","of","Recorder",",","the","tasks","have","been","saved","to","them",".","end_train_func","(","Callable",",","optional",")",":","the","end_train","method","which","need","at","least","`","recorders","`","and","`","experiment_name","`",".","Defaults","to","None","for","using","self.end_train_func",".","experiment_name","(","str",")",":","the","experiment","name",",","None","for","use","default","name",".","kwargs",":","the","params","for","end_train_func",".","Returns",":","List","[","Recorder","]",":","a","list","of","Recorders"]
code: def end_train(
      self,
      recs,
      end_train_func=None,
      experiment_name: str = None,
      **kwargs,
  ) -> List[Recorder]:
      """
      Given a list of Recorder and return a list of trained Recorder.
      This class will finish real data loading and model fitting.
  
      Args:
          recs (list): a list of Recorder, the tasks have been saved to them.
          end_train_func (Callable, optional): the end_train method which need at least `recorders` and `experiment_name`. Defaults to None for using self.end_train_func.
          experiment_name (str): the experiment name, None for use default name.
          kwargs: the params for end_train_func.
  
      Returns:
          List[Recorder]: a list of Recorders
      """
      if isinstance(recs, Recorder):
          recs = [recs]
      if end_train_func is None:
          end_train_func = self.end_train_func
      if experiment_name is None:
          experiment_name = self.experiment_name
      task_pool = self.task_pool
      if task_pool is None:
          task_pool = experiment_name
      _id_list = []
      for rec in recs:
          _id_list.append(rec.list_tags()[self.TM_ID])
  
      query = {"_id": {"$in": _id_list}}
      if not self.skip_run_task:
          run_task(
              end_train_func,
              task_pool,
              query=query,  # only train these tasks
              experiment_name=experiment_name,
              before_status=TaskManager.STATUS_PART_DONE,
              **kwargs,
          )
  
      TaskManager(task_pool=task_pool).wait(query=query)
  
      for rec in recs:
          rec.set_tags(**{self.STATUS_KEY: self.STATUS_END})
      return recs
  
imports: import socket
  from typing import Callable, List, Optional
  from tqdm.auto import tqdm
  from qlib.config import C
  from qlib.data.dataset import Dataset
  from qlib.data.dataset.weight import Reweighter
  from qlib.log import get_module_logger
  from qlib.model.base import Model
  from qlib.utils import auto_filter_kwargs, fill_placeholder, flatten_dict, init_instance_by_config
  from qlib.utils.paral import call_in_subproc
  from qlib.workflow import R
  from qlib.workflow.recorder import Recorder
  from qlib.workflow.task.manage import TaskManager, run_task
label_desc: Use image node_id 3 for calling the DelayTrainerRM obj's underlying member method code with example usage: obj.end_train(recs, end_train_func, experiment_name) and returns: recs