class_docstr: Population-Based Training, also known as Lamarckism or Meta-Optimization.
code: def __init__(
      self,
      names: tp.Tuple[str, ...] = ("sphere", "cigar", "ellipsoid"),
      dimensions: tp.Tuple[int, ...] = (7, 7, 7),
      num_workers: int = 10,
  ):
      for name in names:
          if name not in corefuncs.registry:
              available = ", ".join(sorted(corefuncs.registry))
              raise ValueError(
                  f'Unknown core function "{name}" in PBT. Available names are:\n-----\n{available}'
              )
      self._funcs = [corefuncs.registry[name] for name in names]
      self._optima = [np.random.normal(size=d) for d in dimensions]
      assert len(names) == len(dimensions)
      self._hyperparameter_dimension = len(names)
      self._dimensions = dimensions
      self._total_dimension = sum(dimensions)
      parametrization = p.Array(
          shape=(self._hyperparameter_dimension,)
      ).set_name("")
      # Population of checkpoints (that are optimized by the underlying optimization method)
      # and parameters (that we do optimize).
      self._population_checkpoints: tp.List[np.ndarray] = [
          np.zeros(self._total_dimension)
      ] * num_workers
      self._population_parameters: tp.List[np.ndarray] = [
          np.zeros(self._hyperparameter_dimension)
      ] * num_workers
      self._population_fitness: tp.List[float] = [
          float("inf")
      ] * num_workers
      super().__init__(self._func, parametrization)
  
file_path: nevergrad/nevergrad/functions/pbt.py
imports: import itertools
  import typing
  import numpy
  from nevergrad.parametrization import parameter
  from .base import ExperimentFunction
  from .None import corefuncs
label_desc: Use image node_id 1 to create a new PBT object from inherited base classes: ExperimentFunction with example: obj = PBT(names, dimensions, num_workers)