class_docstr: A special kind of evaluator that does not run real training, but queries a database.
docstr: :meth:`evaluate` receives a sample and returns a float score.
  It also reports intermediate and final results through NNI trial API.
  
  Necessary format conversion and database query should be done in this method.
  
  It is the main interface of this class. Subclass should override this.
docstr_tok: [":","meth",":","`","evaluate","`","receives","a","sample","and","returns","a","float","score",".","It","also","reports","intermediate","and","final","results","through","NNI","trial","API",".","Necessary","format","conversion","and","database","query","should","be","done","in","this","method",".","It","is","the","main","interface","of","this","class",".","Subclass","should","override","this","."]
code: def evaluate(self, sample: Sample) -> Any:
      """:meth:`evaluate` receives a sample and returns a float score.
      It also reports intermediate and final results through NNI trial API.
  
      Necessary format conversion and database query should be done in this method.
  
      It is the main interface of this class. Subclass should override this.
      """
      raise NotImplementedError()
  
imports: from __future__ import annotations
  import itertools
  import logging
  import random
  import warnings
  from typing import Any, cast
  import nni
  from nni.mutable import Sample, Mutable, LabeledMutable, Categorical, CategoricalMultiple, label_scope
  from nni.nas.evaluator import Evaluator
  from nni.nas.space import ExecutableModelSpace
  from .space import SlimBenchmarkSpace
label_desc: Use image node_id 3 for calling the BenchmarkEvaluator obj's underlying member method code with example usage: obj.evaluate(sample) without return types