class_docstr: Trainer based on (R)ecorder and Task(M)anager.
  It can train a list of tasks and return a list of model recorders in a multiprocessing way.
  
  Assumption: `task` will be saved to TaskManager and `task` will be fetched and trained from TaskManager
class_docstr_tok: ["Trainer","based","on","(","R",")","ecorder","and","Task","(","M",")","anager",".","It","can","train","a","list","of","tasks","and","return","a","list","of","model","recorders","in","a","multiprocessing","way",".","Assumption",":","`","task","`","will","be","saved","to","TaskManager","and","`","task","`","will","be","fetched","and","trained","from","TaskManager"]
docstr: Init TrainerR.
  
  Args:
      experiment_name (str): the default name of experiment.
      task_pool (str): task pool name in TaskManager. None for use same name as experiment_name.
      train_func (Callable, optional): default training method. Defaults to `task_train`.
      skip_run_task (bool):
          If skip_run_task == True:
          Only run_task in the worker. Otherwise skip run_task.
docstr_tok: ["Init","TrainerR",".","Args",":","experiment_name","(","str",")",":","the","default","name","of","experiment",".","task_pool","(","str",")",":","task","pool","name","in","TaskManager",".","None","for","use","same","name","as","experiment_name",".","train_func","(","Callable",",","optional",")",":","default","training","method",".","Defaults","to","`","task_train","`",".","skip_run_task","(","bool",")",":","If","skip_run_task","==","True",":","Only","run_task","in","the","worker",".","Otherwise","skip","run_task","."]
code: def __init__(
      self,
      experiment_name: str = None,
      task_pool: str = None,
      train_func=task_train,
      skip_run_task: bool = False,
      default_rec_name: Optional[str] = None,
  ):
      """
      Init TrainerR.
  
      Args:
          experiment_name (str): the default name of experiment.
          task_pool (str): task pool name in TaskManager. None for use same name as experiment_name.
          train_func (Callable, optional): default training method. Defaults to `task_train`.
          skip_run_task (bool):
              If skip_run_task == True:
              Only run_task in the worker. Otherwise skip run_task.
      """
  
      super().__init__()
      self.experiment_name = experiment_name
      self.task_pool = task_pool
      self.train_func = train_func
      self.skip_run_task = skip_run_task
      self.default_rec_name = default_rec_name
  
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 1 to create a new TrainerRM object from inherited base classes: Trainer with example: obj = TrainerRM(experiment_name, task_pool, train_func, skip_run_task, default_rec_name)