class_docstr: A class used in LightningTrainer to compute torchmetrics
  ---
  An example to register a torchmetric:
  
  from mmf.common.registry import registry
  @registry.register_torchmetric("top_k_accuracy")
  class TopKAccuracy(Metric):
      def __init__(
          self,
          k: int = 1,
          ...
      ) -> None:
          ...
      def update(self, sample_list: SampleList,
          model_output: Dict[str, Tensor]) -> None:
          ...
      def compute(self) -> Tensor:
          ...
  
  ---
  To config the metrics in yaml config file:
  
  evaluation:
      torchmetrics:
      - type: top_k_accuracy
          key: top_3_overlap
          params:
          k: 3
      - type: top_k_accuracy
          key: top_1_overlap
          params:
          k: 1
  
  Warning: once torchmetrics are provided, regular mmf metrics will be ignored.
class_docstr_tok: ["A","class","used","in","LightningTrainer","to","compute","torchmetrics","--","-","An","example","to","register","a","torchmetric",":","from","mmf.common.registry","import","registry","@","registry.register_torchmetric","(","``","top_k_accuracy","''",")","class","TopKAccuracy","(","Metric",")",":","def","__init__","(","self",",","k",":","int","=","1",",","...",")","-",">","None",":","...","def","update","(","self",",","sample_list",":","SampleList",",","model_output",":","Dict","[","str",",","Tensor","]",")","-",">","None",":","...","def","compute","(","self",")","-",">","Tensor",":","...","--","-","To","config","the","metrics","in","yaml","config","file",":","evaluation",":","torchmetrics",":","-","type",":","top_k_accuracy","key",":","top_3_overlap","params",":","k",":","3","-","type",":","top_k_accuracy","key",":","top_1_overlap","params",":","k",":","1","Warning",":","once","torchmetrics","are","provided",",","regular","mmf","metrics","will","be","ignored","."]
code: def _is_dataset_applicable(
      self, dataset_name: str, metric_dataset_names: List[str]
  ):
      return (
          len(metric_dataset_names) == 0
          or dataset_name in metric_dataset_names
      )
  
file_path: mmf/mmf/trainers/lightning_core/torchmetric.py
imports: import collections
  import logging
  from typing import Dict, List
  import torch
  from mmf.common.registry import registry
  from mmf.common.sample import SampleList
label_desc: Use image node_id 3 for calling the LightningTorchMetrics obj's underlying member method code with example usage: obj._is_dataset_applicable(dataset_name, metric_dataset_names) and returns: unknown