class_docstr: Defines a set of plots to produce.
  
  This will create plots for the cartesian product of the parameters in this class.
  See :class:`BenchmarkSuite` if you want a union of parameters.
class_docstr_tok: ["Defines","a","set","of","plots","to","produce",".","This","will","create","plots","for","the","cartesian","product","of","the","parameters","in","this","class",".","See",":","class",":","`","BenchmarkSuite","`","if","you","want","a","union","of","parameters","."]
docstr: Filter a dataframe for any metrics that are not relevant to this :class:`BenchmarkSet`.
docstr_tok: ["Filter","a","dataframe","for","any","metrics","that","are","not","relevant","to","this",":","class",":","`","BenchmarkSet","`","."]
code: def filter_metrics(self, metrics_df: pd.DataFrame) -> pd.DataFrame:
      """
      Filter a dataframe for any metrics that are not relevant to this :class:`BenchmarkSet`.
      """
      dataset_names = set(d.name for d in self.datasets)
      model_names = set(m.name for m in self.models)
      return metrics_df[
          metrics_df.dataset.isin(dataset_names)
          & metrics_df.model.isin(model_names)
          & metrics_df.do_compile.isin(self.do_compile)
          & metrics_df.do_optimise.isin(self.do_optimise)
          & (metrics_df.repetition < self.repetitions)
      ]
  
imports: from dataclasses import dataclass
  from typing import Any, Collection, Dict, List, Optional, Sequence, Set, Tuple
  import pandas
  from benchmark.dataset_api import DatasetFactory
  from benchmark.grouping import GroupingKey, GroupingSpec
  from benchmark.model_api import ModelFactory
  from benchmark.plotter_api import Plotter
  from benchmark.registry import Named, Registry
label_desc: Use image node_id 4 for calling the BenchmarkSet obj's underlying member method code with example usage: obj.filter_metrics(metrics_df) and returns: metrics_df