class_docstr: This class is designed for holding information which is used by autologging metrics
  It will hold information of:
  (1) a map of "prediction result object id" to a tuple of dataset name(the dataset is
     the one which generate the prediction result) and run_id.
     Note: We need this map instead of setting the run_id into the "prediction result object"
     because the object maybe a numpy array which does not support additional attribute
     assignment.
  (2) _log_post_training_metrics_enabled flag, in the following method scope:
     `Estimator.fit`, `Model.transform`, `Evaluator.evaluate`,
     in order to avoid nested/duplicated autologging metric, when run into these scopes,
     we need temporarily disable the metric autologging.
  (3) _eval_dataset_info_map, it is a double level map:
     `_eval_dataset_info_map[run_id][eval_dataset_var_name]` will get a list, each
     element in the list is an id of "eval_dataset" instance.
     This data structure is used for:
      * generating unique dataset name key when autologging metric. For each eval dataset object,
        if they have the same eval_dataset_var_name, but object ids are different,
        then they will be assigned different name (via appending index to the
        eval_dataset_var_name) when autologging.
  (4) _evaluator_call_info, it is a double level map:
     `_metric_api_call_info[run_id][metric_name]` wil get a list of tuples, each tuple is:
       (logged_metric_key, evaluator_information)
      Evaluator information includes evaluator class name and params, these information
      will also be logged into "metric_info.json" artifacts.
  
  Note: this class is not thread-safe.
  Design rule for this class:
   Because this class instance is a global instance, in order to prevent memory leak, it should
   only holds IDs and other small objects references. This class internal data structure should
   avoid reference to user dataset variables or model variables.
class_docstr_tok: ["This","class","is","designed","for","holding","information","which","is","used","by","autologging","metrics","It","will","hold","information","of",":","(","1",")","a","map","of","``","prediction","result","object","id","''","to","a","tuple","of","dataset","name","(","the","dataset","is","the","one","which","generate","the","prediction","result",")","and","run_id",".","Note",":","We","need","this","map","instead","of","setting","the","run_id","into","the","``","prediction","result","object","''","because","the","object","maybe","a","numpy","array","which","does","not","support","additional","attribute","assignment",".","(","2",")","_log_post_training_metrics_enabled","flag",",","in","the","following","method","scope",":","`","Estimator.fit","`",",","`","Model.transform","`",",","`","Evaluator.evaluate","`",",","in","order","to","avoid","nested\/duplicated","autologging","metric",",","when","run","into","these","scopes",",","we","need","temporarily","disable","the","metric","autologging",".","(","3",")","_eval_dataset_info_map",",","it","is","a","double","level","map",":","`","_eval_dataset_info_map","[","run_id","]","[","eval_dataset_var_name","]","`","will","get","a","list",",","each","element","in","the","list","is","an","id","of","``","eval_dataset","''","instance",".","This","data","structure","is","used","for",":","*","generating","unique","dataset","name","key","when","autologging","metric",".","For","each","eval","dataset","object",",","if","they","have","the","same","eval_dataset_var_name",",","but","object","ids","are","different",",","then","they","will","be","assigned","different","name","(","via","appending","index","to","the","eval_dataset_var_name",")","when","autologging",".","(","4",")","_evaluator_call_info",",","it","is","a","double","level","map",":","`","_metric_api_call_info","[","run_id","]","[","metric_name","]","`","wil","get","a","list","of","tuples",",","each","tuple","is",":","(","logged_metric_key",",","evaluator_information",")","Evaluator","information","includes","evaluator","class","name","and","params",",","these","information","will","also","be","logged","into","``","metric_info.json","''","artifacts",".","Note",":","this","class","is","not","thread-safe",".","Design","rule","for","this","class",":","Because","this","class","instance","is","a","global","instance",",","in","order","to","prevent","memory","leak",",","it","should","only","holds","IDs","and","other","small","objects","references",".","This","class","internal","data","structure","should","avoid","reference","to","user","dataset","variables","or","model","variables","."]
docstr: Given a registered prediction result dataset object,
  return a tuple of (run_id, eval_dataset_name)
code: def get_run_id_and_dataset_name_for_evaluator_call(
      self, pred_result_dataset
  ):
      """
      Given a registered prediction result dataset object,
      return a tuple of (run_id, eval_dataset_name)
      """
      if (
          id(pred_result_dataset)
          in self._pred_result_id_to_dataset_name_and_run_id
      ):
          (
              dataset_name,
              run_id,
          ) = self._pred_result_id_to_dataset_name_and_run_id[
              id(pred_result_dataset)
          ]
          return run_id, dataset_name
      else:
          return None, None
  
imports: import json
  import logging
  import os
  import sys
  import traceback
  import weakref
  from collections import OrderedDict, defaultdict, namedtuple
  from itertools import zip_longest
  from urllib.parse import urlparse
  import numpy
  import mlflow
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.spark_dataset import SparkDataset
  from mlflow.entities import Metric, Param
  from mlflow.entities.dataset_input import DatasetInput
  from mlflow.entities.input_tag import InputTag
  from mlflow.exceptions import MlflowException
  from mlflow.tracking.client import MlflowClient
  from mlflow.utils import _chunk_dict, _get_fully_qualified_class_name, _inspect_original_var_name, _truncate_dict
  from mlflow.utils.autologging_utils import INPUT_EXAMPLE_SAMPLE_ROWS, _get_new_training_session_class, autologging_integration, get_method_call_arg_value, resolve_input_example_and_signature, safe_patch
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.mlflow_tags import MLFLOW_AUTOLOGGING, MLFLOW_DATASET_CONTEXT, MLFLOW_PARENT_RUN_ID
  from mlflow.utils.rest_utils import MlflowHostCreds, augmented_raise_for_status, http_request
  from mlflow.utils.time import get_current_time_millis
  from mlflow.utils.validation import MAX_ENTITY_KEY_LENGTH, MAX_PARAM_VAL_LENGTH, MAX_PARAMS_TAGS_PER_BATCH
label_desc: Use image node_id 10 for calling the _AutologgingMetricsManager obj's underlying member method code with example usage: obj.get_run_id_and_dataset_name_for_evaluator_call(pred_result_dataset) and returns: run_id,  dataset_name, None,  None