class_docstr: Computes minimum label position.
docstr: Initialize.
  
  Args:
    label_key: The key in the labels dictionary which holds the label. Set
      this to empty to if labels is a Tensor and not a dictionary.
    weight_key: The key in the features dictionary which holds the weights.
      Note that the weight value must be identical across all examples in the
      same query. If set to empty, uses 1.0 instead.
docstr_tok: ["Initialize",".","Args",":","label_key",":","The","key","in","the","labels","dictionary","which","holds","the","label",".","Set","this","to","empty","to","if","labels","is","a","Tensor","and","not","a","dictionary",".","weight_key",":","The","key","in","the","features","dictionary","which","holds","the","weights",".","Note","that","the","weight","value","must","be","identical","across","all","examples","in","the","same","query",".","If","set","to","empty",",","uses","1.0","instead","."]
code: def __init__(self, label_key: str, weight_key: str):
      """Initialize.
  
      Args:
        label_key: The key in the labels dictionary which holds the label. Set
          this to empty to if labels is a Tensor and not a dictionary.
        weight_key: The key in the features dictionary which holds the weights.
          Note that the weight value must be identical across all examples in the
          same query. If set to empty, uses 1.0 instead.
      """
      if not label_key:
          # If label_key is set to the empty string, the user is telling us
          # that their Estimator returns a labels Tensor rather than a
          # dictionary. Set the key to the magic key we use in that case.
          self._label_key = eval_saved_model_util.default_dict_key(
              eval_saved_model_constants.LABELS_NAME
          )
      else:
          self._label_key = label_key
      self._weight_key = weight_key
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/query_metrics/min_label_position.py
imports: from typing import Any, Dict, Iterable, NamedTuple
  import apache_beam
  from tensorflow_model_analysis.eval_saved_model import constants
  from tensorflow_model_analysis.eval_saved_model import util
  from tensorflow_model_analysis.evaluators.query_metrics import query_types
  from tensorflow_model_analysis.post_export_metrics import metric_keys
label_desc: Use image node_id 1 to create a new MinLabelPositionCombineFn object from inherited base classes: beam with example: obj = MinLabelPositionCombineFn(label_key, weight_key)