class_docstr: Splittable chunk of a benchmark
  
  Parameters
  ----------
  name: str
      Name of the benchmark
  repetitions: int
      Number of repetitions to perform on the benchmark
  seed: int
      A seed for the experiment plan (if seedable)
  cap_index: int
      index at which the experiment plan must be stopped (convenient for testing if the experiment
      plan holds 10k experiment, we can select the first cap_index=100 for instance)
class_docstr_tok: ["Splittable","chunk","of","a","benchmark","Parameters","--","--","--","--","--","name",":","str","Name","of","the","benchmark","repetitions",":","int","Number","of","repetitions","to","perform","on","the","benchmark","seed",":","int","A","seed","for","the","experiment","plan","(","if","seedable",")","cap_index",":","int","index","at","which","the","experiment","plan","must","be","stopped","(","convenient","for","testing","if","the","experiment","plan","holds","10k","experiment",",","we","can","select","the","first","cap_index=100","for","instance",")"]
docstr: Run all the experiments and returns the result dataframe.
  
  Parameters
  ----------
  print_function: tp.Callable
      a function to print at the end of each experiment (for custom logging)
docstr_tok: ["Run","all","the","experiments","and","returns","the","result","dataframe",".","Parameters","--","--","--","--","--","print_function",":","tp.Callable","a","function","to","print","at","the","end","of","each","experiment","(","for","custom","logging",")"]
code: def compute(
      self,
      process_function: tp.Optional[
          tp.Callable[["BenchmarkChunk", Experiment], None]
      ] = None,
  ) -> utils.Selector:
      """Run all the experiments and returns the result dataframe.
  
      Parameters
      ----------
      print_function: tp.Callable
          a function to print at the end of each experiment (for custom logging)
      """
      for local_ind, (index, xp) in enumerate(self):
          if local_ind < len(self.summaries):
              continue  # already computed
          indstr = f"{index} ({local_ind + 1}/{len(self)} of worker)"
          print(f"Starting {indstr}: {xp}", flush=True)
          if self._current_experiment is None:
              self._current_experiment = xp
          else:  # computation was started but interrupted (eg: KeyboardInterrupt)
              if xp != self._current_experiment:
                  warnings.warn(
                      f"Could not resume unfinished xp: {self._current_experiment}"
                  )
                  self._current_experiment = xp
              else:
                  opt = self._current_experiment._optimizer
                  if opt is not None:
                      print(
                          f"Resuming existing experiment from iteration {opt.num_ask}.",
                          flush=True,
                      )
          self._current_experiment.run()
          summary = self._current_experiment.get_description()
          if process_function is not None:
              process_function(self, self._current_experiment)
          self.summaries.append(summary)
          self._current_experiment = None
          print(f"Finished {indstr}", flush=True)
      return utils.Selector(data=self.summaries)
  
imports: import datetime
  import warnings
  import itertools
  import importlib.util
  from pathlib import Path
  import numpy
  import pandas
  import nevergrad.common.typing
  from nevergrad.optimization.utils import SequentialExecutor
  from .experiments import registry
  from .experiments import Experiment
  from .None import utils
label_desc: Use image node_id 8 for calling the BenchmarkChunk obj's underlying member method code with example usage: obj.compute(process_function) and returns: utils