class_docstr: A union of :class:`BenchmarkSet`\s.
  
  This is the main definition of work in this framework.
  
  This will intelligently merge tasks, so if a task is present in multiple benchmark sets, it is
  executed once, and the result reused.
class_docstr_tok: ["A","union","of",":","class",":","`","BenchmarkSet","`","\\s",".","This","is","the","main","definition","of","work","in","this","framework",".","This","will","intelligently","merge","tasks",",","so","if","a","task","is","present","in","multiple","benchmark","sets",",","it","is","executed","once",",","and","the","result","reused","."]
docstr: Computes the minimal number of benchmarks to run for this suite.
docstr_tok: ["Computes","the","minimal","number","of","benchmarks","to","run","for","this","suite","."]
code: def get_tasks(self) -> Collection[BenchmarkTask]:
      """
      Computes the minimal number of benchmarks to run for this suite.
      """
      result: Dict[Tuple[str, str, bool, bool], BenchmarkTask] = {}
      for benchmark_set in self.sets:
          for task in benchmark_set.get_tasks():
              key = (
                  task.dataset_name,
                  task.model_name,
                  task.do_compile,
                  task.do_optimise,
              )
              if key in result:
                  old_task = result[key]
                  old_task.do_predict |= task.do_predict
                  old_task.do_posterior |= task.do_posterior
                  old_task.repetitions = max(
                      old_task.repetitions, task.repetitions
                  )
              else:
                  result[key] = task
      return list(result.values())
  
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 2 for calling the BenchmarkSuite obj's underlying member method code with example usage: obj.get_tasks() and returns: list