class_docstr: Ranking metric.
class_docstr_tok: ["Ranking","metric","."]
docstr: Get the relevance dictionary for the run.
  
  The run relevance dictionary contains the relevance values of each
  document as determined by the model. It is compared to the true
  relevance dictionary, which contains the ground truth relevance
  values for each document.
docstr_tok: ["Get","the","relevance","dictionary","for","the","run",".","The","run","relevance","dictionary","contains","the","relevance","values","of","each","document","as","determined","by","the","model",".","It","is","compared","to","the","true","relevance","dictionary",",","which","contains","the","ground","truth","relevance","values","for","each","document","."]
code: def get_run_relevances(
      self,
      ranking_objs: List[RankingObject],
      rank_limit: Optional[int] = None,
  ) -> Dict[str, int]:
      """Get the relevance dictionary for the run.
  
      The run relevance dictionary contains the relevance values of each
      document as determined by the model. It is compared to the true
      relevance dictionary, which contains the ground truth relevance
      values for each document.
      """
      assert all([r.model_relevance is not None for r in ranking_objs])
      if rank_limit:
          return {
              self.get_query_string(r.reference_index): r.model_relevance  # type: ignore
              for r in ranking_objs
              if r.rank and r.rank <= rank_limit
          }
      return {
          self.get_query_string(r.reference_index): r.model_relevance
          for r in ranking_objs
      }
  
imports: from dataclasses import dataclass
  from typing import Callable, Dict, List, Tuple, Optional
  import pytrec_eval
  from helm.benchmark.adaptation.adapters.adapter_factory import ADAPT_RANKING_BINARY
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.scenarios.scenario import unpack_tag, CORRECT_TAG, Reference
  from helm.common.request import RequestResult
  from helm.common.general import binarize_dict
  from .metric import Metric
  from .metric_name import MetricName
  from .metric_service import MetricService
  from .statistic import Stat
label_desc: Use image node_id 8 for calling the RankingMetric obj's underlying member method code with example usage: obj.get_run_relevances(ranking_objs, rank_limit) and returns: unknown, unknown