class_docstr: Pipeline of BaseExploit objects
  
  The pipeline executes the BaseExploit objects sequentially. If one object returns
  `None`, the pipeline is stopped and it returns `None`. Likewise, if one object returns
  a trial different than the one passed, the pipeline is stopped and this trial is returned.
  Otherwise, if all BaseExploit objects return the same trial as the one passed to the pipeline,
  then the pipeline returns it.
  
  Parameters
  ----------
  exploit_configs: list of dict
      List of dictionary representing the configurations of BaseExploit children.
  
  Examples
  --------
  >>> PipelineExploit(
      exploit_configs=[
          {'of_type': 'BacktrackExploit'},
          {'of_type': 'TruncateExploit'}
      ])
class_docstr_tok: ["Pipeline","of","BaseExploit","objects","The","pipeline","executes","the","BaseExploit","objects","sequentially",".","If","one","object","returns","`","None","`",",","the","pipeline","is","stopped","and","it","returns","`","None","`",".","Likewise",",","if","one","object","returns","a","trial","different","than","the","one","passed",",","the","pipeline","is","stopped","and","this","trial","is","returned",".","Otherwise",",","if","all","BaseExploit","objects","return","the","same","trial","as","the","one","passed","to","the","pipeline",",","then","the","pipeline","returns","it",".","Parameters","--","--","--","--","--","exploit_configs",":","list","of","dict","List","of","dictionary","representing","the","configurations","of","BaseExploit","children",".","Examples","--","--","--","--",">",">",">","PipelineExploit","(","exploit_configs=","[","{","'of_type","'",":","'BacktrackExploit","'","}",",","{","'of_type","'",":","'TruncateExploit","'","}","]",")"]
docstr: Execute exploit objects sequentially
  
  If one object returns `None`, the pipeline is stopped and it returns `None`. Likewise, if
  one object returns a trial different than the one passed, the pipeline is stopped and this
  trial is returned.  Otherwise, if all BaseExploit objects return the same trial as the one
  passed to the pipeline, then the pipeline returns it.
  
  Parameters
  ----------
  rng: numpy.random.Generator
      A random number generator. It is not contained in ``BaseExploit`` because the exploit
      class must be stateless.
  trial: Trial
      The :py:class:`orion.core.worker.trial.Trial` that is currently under examination.
  lineages: Lineages
      All :py:class:`orion.algo.pbt.pbt.Lineages` created by the population based training
      algorithm that is using this exploit class.
  
  Returns
  -------
  ``None``
      The exploit class signals that there are not enough completed trials in lineages to make
      a decision for current trial.
  ``Trial``
      If the returned trial is the same as the one received as argument, it means that
      population based training should continue with same parameters.
      If another trial from the lineages is returned, it means that population based training
      should try to explore new parameters.
docstr_tok: ["Execute","exploit","objects","sequentially","If","one","object","returns","`","None","`",",","the","pipeline","is","stopped","and","it","returns","`","None","`",".","Likewise",",","if","one","object","returns","a","trial","different","than","the","one","passed",",","the","pipeline","is","stopped","and","this","trial","is","returned",".","Otherwise",",","if","all","BaseExploit","objects","return","the","same","trial","as","the","one","passed","to","the","pipeline",",","then","the","pipeline","returns","it",".","Parameters","--","--","--","--","--","rng",":","numpy.random.Generator","A","random","number","generator",".","It","is","not","contained","in","``","BaseExploit","``","because","the","exploit","class","must","be","stateless",".","trial",":","Trial","The",":","py",":","class",":","`","orion.core.worker.trial.Trial","`","that","is","currently","under","examination",".","lineages",":","Lineages","All",":","py",":","class",":","`","orion.algo.pbt.pbt.Lineages","`","created","by","the","population","based","training","algorithm","that","is","using","this","exploit","class",".","Returns","--","--","--","-","``","None","``","The","exploit","class","signals","that","there","are","not","enough","completed","trials","in","lineages","to","make","a","decision","for","current","trial",".","``","Trial","``","If","the","returned","trial","is","the","same","as","the","one","received","as","argument",",","it","means","that","population","based","training","should","continue","with","same","parameters",".","If","another","trial","from","the","lineages","is","returned",",","it","means","that","population","based","training","should","try","to","explore","new","parameters","."]
code: def __call__(self, rng, trial, lineages):
      """Execute exploit objects sequentially
  
      If one object returns `None`, the pipeline is stopped and it returns `None`. Likewise, if
      one object returns a trial different than the one passed, the pipeline is stopped and this
      trial is returned.  Otherwise, if all BaseExploit objects return the same trial as the one
      passed to the pipeline, then the pipeline returns it.
  
      Parameters
      ----------
      rng: numpy.random.Generator
          A random number generator. It is not contained in ``BaseExploit`` because the exploit
          class must be stateless.
      trial: Trial
          The :py:class:`orion.core.worker.trial.Trial` that is currently under examination.
      lineages: Lineages
          All :py:class:`orion.algo.pbt.pbt.Lineages` created by the population based training
          algorithm that is using this exploit class.
  
      Returns
      -------
      ``None``
          The exploit class signals that there are not enough completed trials in lineages to make
          a decision for current trial.
      ``Trial``
          If the returned trial is the same as the one received as argument, it means that
          population based training should continue with same parameters.
          If another trial from the lineages is returned, it means that population based training
          should try to explore new parameters.
  
      """
  
      for exploit in self.pipeline:
          logger.debug("Executing %s", exploit.__class__.__name__)
          selected_trial = exploit(rng, trial, lineages)
          if selected_trial is not trial:
              logger.debug(
                  "Exploit %s selected trial %s over %s",
                  exploit.__class__.__name__,
                  selected_trial,
                  trial,
              )
              return selected_trial
          else:
              logger.debug(
                  "Exploit %s is skipping for trial %s",
                  exploit.__class__.__name__,
                  trial,
              )
  
      return trial
  
imports: import logging
  import numpy
  from orion.core.utils import GenericFactory
label_desc: Use image node_id 2 for calling the PipelineExploit obj's underlying member method code with example usage: obj.__call__(rng, trial, lineages) and returns: trial, selected_trial