class_docstr: This is the `Experiment` class for each experiment being run. The API is designed similar to mlflow.
  (The link: https://mlflow.org/docs/latest/python_api/mlflow.html)
class_docstr_tok: ["This","is","the","`","Experiment","`","class","for","each","experiment","being","run",".","The","API","is","designed","similar","to","mlflow",".","(","The","link",":","https",":","\/\/mlflow.org\/docs\/latest\/python_api\/mlflow.html",")"]
docstr: Retrieve a Recorder for user. When user specify recorder id and name, the method will try to return the
  specific recorder. When user does not provide recorder id or name, the method will try to return the current
  active recorder. The `create` argument determines whether the method will automatically create a new recorder
  according to user's specification if the recorder hasn't been created before.
  
  * If `create` is True:
  
      * If `active recorder` exists:
  
          * no id or name specified, return the active recorder.
          * if id or name is specified, return the specified recorder. If no such exp found, create a new recorder with given id or name. If `start` is set to be True, the recorder is set to be active.
  
      * If `active recorder` not exists:
  
          * no id or name specified, create a new recorder.
          * if id or name is specified, return the specified experiment. If no such exp found, create a new recorder with given id or name. If `start` is set to be True, the recorder is set to be active.
  
  * Else If `create` is False:
  
      * If `active recorder` exists:
  
          * no id or name specified, return the active recorder.
          * if id or name is specified, return the specified recorder. If no such exp found, raise Error.
  
      * If `active recorder` not exists:
  
          * no id or name specified, raise Error.
          * if id or name is specified, return the specified recorder. If no such exp found, raise Error.
  
  Parameters
  ----------
  recorder_id : str
      the id of the recorder to be deleted.
  recorder_name : str
      the name of the recorder to be deleted.
  create : boolean
      create the recorder if it hasn't been created before.
  start : boolean
      start the new recorder if one is **created**.
  
  Returns
  -------
  A recorder object.
docstr_tok: ["Retrieve","a","Recorder","for","user",".","When","user","specify","recorder","id","and","name",",","the","method","will","try","to","return","the","specific","recorder",".","When","user","does","not","provide","recorder","id","or","name",",","the","method","will","try","to","return","the","current","active","recorder",".","The","`","create","`","argument","determines","whether","the","method","will","automatically","create","a","new","recorder","according","to","user","'s","specification","if","the","recorder","has","n't","been","created","before",".","*","If","`","create","`","is","True",":","*","If","`","active","recorder","`","exists",":","*","no","id","or","name","specified",",","return","the","active","recorder",".","*","if","id","or","name","is","specified",",","return","the","specified","recorder",".","If","no","such","exp","found",",","create","a","new","recorder","with","given","id","or","name",".","If","`","start","`","is","set","to","be","True",",","the","recorder","is","set","to","be","active",".","*","If","`","active","recorder","`","not","exists",":","*","no","id","or","name","specified",",","create","a","new","recorder",".","*","if","id","or","name","is","specified",",","return","the","specified","experiment",".","If","no","such","exp","found",",","create","a","new","recorder","with","given","id","or","name",".","If","`","start","`","is","set","to","be","True",",","the","recorder","is","set","to","be","active",".","*","Else","If","`","create","`","is","False",":","*","If","`","active","recorder","`","exists",":","*","no","id","or","name","specified",",","return","the","active","recorder",".","*","if","id","or","name","is","specified",",","return","the","specified","recorder",".","If","no","such","exp","found",",","raise","Error",".","*","If","`","active","recorder","`","not","exists",":","*","no","id","or","name","specified",",","raise","Error",".","*","if","id","or","name","is","specified",",","return","the","specified","recorder",".","If","no","such","exp","found",",","raise","Error",".","Parameters","--","--","--","--","--","recorder_id",":","str","the","id","of","the","recorder","to","be","deleted",".","recorder_name",":","str","the","name","of","the","recorder","to","be","deleted",".","create",":","boolean","create","the","recorder","if","it","has","n't","been","created","before",".","start",":","boolean","start","the","new","recorder","if","one","is","*","*","created","*","*",".","Returns","--","--","--","-","A","recorder","object","."]
code: def get_recorder(
      self,
      recorder_id=None,
      recorder_name=None,
      create: bool = True,
      start: bool = False,
  ) -> Recorder:
      """
      Retrieve a Recorder for user. When user specify recorder id and name, the method will try to return the
      specific recorder. When user does not provide recorder id or name, the method will try to return the current
      active recorder. The `create` argument determines whether the method will automatically create a new recorder
      according to user's specification if the recorder hasn't been created before.
  
      * If `create` is True:
  
          * If `active recorder` exists:
  
              * no id or name specified, return the active recorder.
              * if id or name is specified, return the specified recorder. If no such exp found, create a new recorder with given id or name. If `start` is set to be True, the recorder is set to be active.
  
          * If `active recorder` not exists:
  
              * no id or name specified, create a new recorder.
              * if id or name is specified, return the specified experiment. If no such exp found, create a new recorder with given id or name. If `start` is set to be True, the recorder is set to be active.
  
      * Else If `create` is False:
  
          * If `active recorder` exists:
  
              * no id or name specified, return the active recorder.
              * if id or name is specified, return the specified recorder. If no such exp found, raise Error.
  
          * If `active recorder` not exists:
  
              * no id or name specified, raise Error.
              * if id or name is specified, return the specified recorder. If no such exp found, raise Error.
  
      Parameters
      ----------
      recorder_id : str
          the id of the recorder to be deleted.
      recorder_name : str
          the name of the recorder to be deleted.
      create : boolean
          create the recorder if it hasn't been created before.
      start : boolean
          start the new recorder if one is **created**.
  
      Returns
      -------
      A recorder object.
      """
      # special case of getting the recorder
      if recorder_id is None and recorder_name is None:
          if self.active_recorder is not None:
              return self.active_recorder
          recorder_name = self._default_rec_name
      if create:
          recorder, is_new = self._get_or_create_rec(
              recorder_id=recorder_id, recorder_name=recorder_name
          )
      else:
          recorder, is_new = (
              self._get_recorder(
                  recorder_id=recorder_id, recorder_name=recorder_name
              ),
              False,
          )
      if is_new and start:
          self.active_recorder = recorder
          # start the recorder
          self.active_recorder.start_run()
      return recorder
  
imports: from typing import Dict, List, Union
  from qlib.typehint import Literal
  import mlflow
  from mlflow.entities import ViewType
  from mlflow.exceptions import MlflowException
  from .recorder import Recorder, MLflowRecorder
  from ..log import get_module_logger
label_desc: Use image node_id 10 for calling the Experiment obj's underlying member method code with example usage: obj.get_recorder(recorder_id, recorder_name, create, start) and returns: recorder, self