class_docstr: Collects metrics and sends them directly to SageMaker Metrics data plane APIs.
class_docstr_tok: ["Collects","metrics","and","sends","them","directly","to","SageMaker","Metrics","data","plane","APIs","."]
docstr: Initialize a `_MetricsManager` instance
  
  Args:
      trial_component_name (str): The Name of the Trial Component to log metrics to
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed. If not specified, one is created using the
          default AWS configuration chain.
      sink (object): The metrics sink to use.
docstr_tok: ["Initialize","a","`","_MetricsManager","`","instance","Args",":","trial_component_name","(","str",")",":","The","Name","of","the","Trial","Component","to","log","metrics","to","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","one","is","created","using","the","default","AWS","configuration","chain",".","sink","(","object",")",":","The","metrics","sink","to","use","."]
code: def __init__(
      self,
      trial_component_name: str,
      sagemaker_session: Session,
      sink=None,
  ) -> None:
      """Initialize a `_MetricsManager` instance
  
      Args:
          trial_component_name (str): The Name of the Trial Component to log metrics to
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed. If not specified, one is created using the
              default AWS configuration chain.
          sink (object): The metrics sink to use.
      """
      if sink is None:
          self.sink = _SyncMetricsSink(
              trial_component_name,
              sagemaker_session.sagemaker_metrics_client,
          )
      else:
          self.sink = sink
  
imports: from __future__ import absolute_import
  import datetime
  import logging
  import os
  import time
  import threading
  import queue
  import dateutil.tz
  from sagemaker.session import Session
label_desc: Use image node_id 1 to create a new _MetricsManager object from inherited base classes: object with example: obj = _MetricsManager(trial_component_name, sagemaker_session, sink)