class_docstr: Client of an MLflow Tracking Server that creates and manages experiments and runs.
class_docstr_tok: ["Client","of","an","MLflow","Tracking","Server","that","creates","and","manages","experiments","and","runs","."]
docstr: Log a metric against the run ID.
  
  :param run_id: The run id to which the metric should be logged.
  :param key: Metric name (string). This string may only contain alphanumerics,
              underscores (_), dashes (-), periods (.), spaces ( ), and slashes (/).
              All backend stores will support keys up to length 250, but some may
              support larger keys.
  :param value: Metric value (float) or single-item ndarray / tensor.
                Note that some special values such
                as +/- Infinity may be replaced by other values depending on the store. For
                example, the SQLAlchemy store replaces +/- Inf with max / min float values.
                All backend stores will support values up to length 5000, but some
                may support larger values.
  :param timestamp: Time when this metric was calculated. Defaults to the current system time.
  :param step: Training step (iteration) at which was the metric calculated. Defaults to 0.
  :param synchronous: *Experimental* If True, blocks until the metric is logged
                      successfully. If False, logs the metric asynchronously and
                      returns a future representing the logging operation.
  
  :return: When synchronous=True, returns None.
           When synchronous=False, returns :py:class:`mlflow.RunOperations` that represents
           future for logging operation.
docstr_tok: ["Log","a","metric","against","the","run","ID",".",":","param","run_id",":","The","run","id","to","which","the","metric","should","be","logged",".",":","param","key",":","Metric","name","(","string",")",".","This","string","may","only","contain","alphanumerics",",","underscores","(","_",")",",","dashes","(","-",")",",","periods","(",".",")",",","spaces","(",")",",","and","slashes","(","\/",")",".","All","backend","stores","will","support","keys","up","to","length","250",",","but","some","may","support","larger","keys",".",":","param","value",":","Metric","value","(","float",")","or","single-item","ndarray","\/","tensor",".","Note","that","some","special","values","such","as","+\/-","Infinity","may","be","replaced","by","other","values","depending","on","the","store",".","For","example",",","the","SQLAlchemy","store","replaces","+\/-","Inf","with","max","\/","min","float","values",".","All","backend","stores","will","support","values","up","to","length","5000",",","but","some","may","support","larger","values",".",":","param","timestamp",":","Time","when","this","metric","was","calculated",".","Defaults","to","the","current","system","time",".",":","param","step",":","Training","step","(","iteration",")","at","which","was","the","metric","calculated",".","Defaults","to","0.",":","param","synchronous",":","*","Experimental","*","If","True",",","blocks","until","the","metric","is","logged","successfully",".","If","False",",","logs","the","metric","asynchronously","and","returns","a","future","representing","the","logging","operation",".",":","return",":","When","synchronous=True",",","returns","None",".","When","synchronous=False",",","returns",":","py",":","class",":","`","mlflow.RunOperations","`","that","represents","future","for","logging","operation","."]
code: def log_metric(
      self,
      run_id,
      key,
      value,
      timestamp=None,
      step=None,
      synchronous=True,
  ) -> Optional[RunOperations]:
      """
      Log a metric against the run ID.
  
      :param run_id: The run id to which the metric should be logged.
      :param key: Metric name (string). This string may only contain alphanumerics,
                  underscores (_), dashes (-), periods (.), spaces ( ), and slashes (/).
                  All backend stores will support keys up to length 250, but some may
                  support larger keys.
      :param value: Metric value (float) or single-item ndarray / tensor.
                    Note that some special values such
                    as +/- Infinity may be replaced by other values depending on the store. For
                    example, the SQLAlchemy store replaces +/- Inf with max / min float values.
                    All backend stores will support values up to length 5000, but some
                    may support larger values.
      :param timestamp: Time when this metric was calculated. Defaults to the current system time.
      :param step: Training step (iteration) at which was the metric calculated. Defaults to 0.
      :param synchronous: *Experimental* If True, blocks until the metric is logged
                          successfully. If False, logs the metric asynchronously and
                          returns a future representing the logging operation.
  
      :return: When synchronous=True, returns None.
               When synchronous=False, returns :py:class:`mlflow.RunOperations` that represents
               future for logging operation.
  
      """
      timestamp = (
          timestamp
          if timestamp is not None
          else get_current_time_millis()
      )
      step = step if step is not None else 0
      metric_value = convert_metric_value_to_float_if_possible(value)
      metric = Metric(key, metric_value, timestamp, step)
      if synchronous:
          self.store.log_metric(run_id, metric)
      else:
          return self.store.log_metric_async(run_id, metric)
  
imports: import os
  from collections import OrderedDict
  from itertools import zip_longest
  from typing import List, Optional
  from mlflow.entities import ExperimentTag, Metric, Param, RunStatus, RunTag, ViewType
  from mlflow.entities.dataset_input import DatasetInput
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, ErrorCode
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.tracking import GET_METRIC_HISTORY_MAX_RESULTS, SEARCH_MAX_RESULTS_DEFAULT
  from mlflow.tracking._tracking_service import utils
  from mlflow.tracking.metric_value_conversion_utils import convert_metric_value_to_float_if_possible
  from mlflow.utils import chunk_list
  from mlflow.utils.async_logging.run_operations import RunOperations, get_combined_run_operations
  from mlflow.utils.mlflow_tags import MLFLOW_USER
  from mlflow.utils.string_utils import is_string_type
  from mlflow.utils.time import get_current_time_millis
  from mlflow.utils.uri import add_databricks_profile_info_to_artifact_uri
  from mlflow.utils.validation import MAX_ENTITIES_PER_BATCH, MAX_METRICS_PER_BATCH, MAX_PARAMS_TAGS_PER_BATCH, PARAM_VALIDATION_MSG, _validate_experiment_artifact_location, _validate_run_id
label_desc: Use image node_id 13 for calling the TrackingServiceClient obj's underlying member method code with example usage: obj.log_metric(run_id, key, value, timestamp, step, synchronous) and returns: self