class_docstr: A global system that helps to manage the experiments.
class_docstr_tok: ["A","global","system","that","helps","to","manage","the","experiments","."]
docstr: Log a local file or directory as an artifact of the currently active run
  
  - If `active recorder` exists: it will set tags through the active recorder.
  - If `active recorder` not exists: the system will create a default experiment as well as a new recorder, and set the tags under it.
  
  Parameters
  ----------
  local_path : str
      Path to the file to write.
  artifact_path : Optional[str]
      If provided, the directory in ``artifact_uri`` to write to.
docstr_tok: ["Log","a","local","file","or","directory","as","an","artifact","of","the","currently","active","run","-","If","`","active","recorder","`","exists",":","it","will","set","tags","through","the","active","recorder",".","-","If","`","active","recorder","`","not","exists",":","the","system","will","create","a","default","experiment","as","well","as","a","new","recorder",",","and","set","the","tags","under","it",".","Parameters","--","--","--","--","--","local_path",":","str","Path","to","the","file","to","write",".","artifact_path",":","Optional","[","str","]","If","provided",",","the","directory","in","``","artifact_uri","``","to","write","to","."]
code: def log_artifact(
      self, local_path: str, artifact_path: Optional[str] = None
  ):
      """
      Log a local file or directory as an artifact of the currently active run
  
      - If `active recorder` exists: it will set tags through the active recorder.
      - If `active recorder` not exists: the system will create a default experiment as well as a new recorder, and set the tags under it.
  
      Parameters
      ----------
      local_path : str
          Path to the file to write.
      artifact_path : Optional[str]
          If provided, the directory in ``artifact_uri`` to write to.
      """
      self.get_exp(start=True).get_recorder(start=True).log_artifact(
          local_path, artifact_path
      )
  
imports: from contextlib import contextmanager
  from typing import Text, Optional, Any, Dict
  from .expm import ExpManager
  from .exp import Experiment
  from .recorder import Recorder
  from ..utils import Wrapper
  from ..utils.exceptions import RecorderInitializationError
  import sys
label_desc: Use image node_id 20 for calling the QlibRecorder obj's underlying member method code with example usage: obj.log_artifact(local_path, artifact_path) without return types