class_docstr: Combines a function and its parametrization for running experiments (see benchmark subpackage)
  
  Parameters
  ----------
  function: callable
      the callable to convert
  parametrization: Parameter
      the parametrization of the function
  Notes
  -----
  - you can redefine custom "evaluation_function" and "compute_pseudotime" for custom behaviors in experiments
  - the bool/int/str/float init arguments are added as descriptors for the experiment which will serve in
    definining test cases. You can add more through "add_descriptors".
  - Makes sure you the "copy()" methods works (provides a new copy of the function *and* its parametrization)
    if you subclass ExperimentFunction since it is intensively used in benchmarks.
    By default, this will create a new instance using the same init arguments as your current instance
    (they were recorded through "__new__"'s magic) and apply the additional descriptors you may have added,
    as well as propagate the new parametrization *if it has a different name as the current one*.
class_docstr_tok: ["Combines","a","function","and","its","parametrization","for","running","experiments","(","see","benchmark","subpackage",")","Parameters","--","--","--","--","--","function",":","callable","the","callable","to","convert","parametrization",":","Parameter","the","parametrization","of","the","function","Notes","--","--","-","-","you","can","redefine","custom","``","evaluation_function","''","and","``","compute_pseudotime","''","for","custom","behaviors","in","experiments","-","the","bool\/int\/str\/float","init","arguments","are","added","as","descriptors","for","the","experiment","which","will","serve","in","definining","test","cases",".","You","can","add","more","through","``","add_descriptors","''",".","-","Makes","sure","you","the","``","copy","(",")","''","methods","works","(","provides","a","new","copy","of","the","function","*","and","*","its","parametrization",")","if","you","subclass","ExperimentFunction","since","it","is","intensively","used","in","benchmarks",".","By","default",",","this","will","create","a","new","instance","using","the","same","init","arguments","as","your","current","instance","(","they","were","recorded","through","``","__new__","''","'s","magic",")","and","apply","the","additional","descriptors","you","may","have","added",",","as","well","as","propagate","the","new","parametrization","*","if","it","has","a","different","name","as","the","current","one","*","."]
docstr: Provides the evaluation crieterion for the experiment.
  In case of mono-objective, it defers to evaluation_function
  Otherwise, it uses the hypervolume.
  This function can be overriden to provide custom behaviors.
  
  Parameters
  ----------
  *pareto: Parameter
      pareto front provided by the optimizer
docstr_tok: ["Provides","the","evaluation","crieterion","for","the","experiment",".","In","case","of","mono-objective",",","it","defers","to","evaluation_function","Otherwise",",","it","uses","the","hypervolume",".","This","function","can","be","overriden","to","provide","custom","behaviors",".","Parameters","--","--","--","--","--","*","pareto",":","Parameter","pareto","front","provided","by","the","optimizer"]
code: def evaluation_function(self, *recommendations: p.Parameter) -> float:
      """Provides the evaluation crieterion for the experiment.
      In case of mono-objective, it defers to evaluation_function
      Otherwise, it uses the hypervolume.
      This function can be overriden to provide custom behaviors.
  
      Parameters
      ----------
      *pareto: Parameter
          pareto front provided by the optimizer
      """
  
      if (
          self.multiobjective_upper_bounds is None
      ):  # singleobjective case
          assert len(recommendations) == 1
          output = self.function(
              *recommendations[0].args, **recommendations[0].kwargs
          )
          assert isinstance(
              output, numbers.Number
          ), f"evaluation_function can only be called on singleobjective experiments (output={output}) function={self.function}."
          return output  # type: ignore
      # multiobjective case
      hypervolume = mobj.HypervolumePareto(
          upper_bounds=self.multiobjective_upper_bounds,
          seed=self.parametrization.random_state,
      )
      for candidate in recommendations:
          hypervolume.add(candidate)
      return -hypervolume.best_volume
  
imports: import inspect
  from pathlib import Path
  import numbers
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.common.errors import UnsupportedExperiment
  from nevergrad.parametrization import parameter
  from nevergrad.optimization import multiobjective
label_desc: Use image node_id 15 for calling the ExperimentFunction obj's underlying member method code with example usage: obj.evaluation_function() and returns: unknown, output