class_docstr: :class:`TopkMetric` is a base object of top-k metrics. If you want to
  implement an top-k metric, you can inherit this class.
  
  Args:
      config (Config): The config of evaluator.
class_docstr_tok: [":","class",":","`","TopkMetric","`","is","a","base","object","of","top-k","metrics",".","If","you","want","to","implement","an","top-k","metric",",","you","can","inherit","this","class",".","Args",":","config","(","Config",")",":","The","config","of","evaluator","."]
code: def __init__(self, config):
      super().__init__(config)
      self.topk = config["topk"]
  
file_path: RecBole/recbole/evaluator/base_metric.py
imports: import torch
  from recbole.utils import EvaluatorType
label_desc: Use image node_id 1 to create a new TopkMetric object from inherited base classes: AbstractMetric with example: obj = TopkMetric(config)