src/orion/client/experiment.py
def suggest(self):
        """Suggest a trial to execute.

        Experiment must be in executable ('x') mode.

        If any trial is available (new or interrupted), it selects one and reserves it.
        Otherwise, the algorithm is used to generate a new trial that is registered in storage and
        reserved.

        Returns
        -------
        `orior.core.worker.trial.Trial` or None
            Reserved trial for execution. Will return None if experiment is done.
            of if the algorithm cannot suggest until other trials complete.

        Raises
        ------
        :class:`orion.core.utils.exceptions.WaitingForTrials`
            if the experiment is not completed and algorithm needs to wait for some
            trials to complete before it can suggest new trials.

        :class:`orion.core.utils.exceptions.BrokenExperiment`
            if too many trials failed to run and the experiment cannot continue.
            This is determined by ``max_broken`` in the configuration of the experiment.

        :class:`orion.core.utils.exceptions.SampleTimeout`
            if the algorithm of the experiment could not sample new unique points.

        :class:`orion.core.utils.exceptions.UnsupportedOperation`
            If the experiment was not loaded in executable mode.

        """
        self._check_if_executable()

        if self.is_broken:
            raise BrokenExperiment("Trials failed too many times")

        if self.is_done:
            return None

        try:
            trial = orion.core.worker.reserve_trial(self._experiment, self._producer)

        except WaitingForTrials as e:
            if self.is_broken:
                raise BrokenExperiment("Trials failed too many times") from e

            raise e

        except SampleTimeout as e:
            if self.is_broken:
                raise BrokenExperiment("Trials failed too many times") from e

            raise e

        if trial is not None:
            self._maintain_reservation(trial)

        return trial
Suggest a trial to execute.

        Experiment must be in executable ('x') mode.

        If any trial is available (new or interrupted), it selects one and reserves it.
        Otherwise, the algorithm is used to generate a new trial that is registered in storage and
        reserved.

        Returns
        -------
        `orior.core.worker.trial.Trial` or None
            Reserved trial for execution. Will return None if experiment is done.
            of if the algorithm cannot suggest until other trials complete.

        Raises
        ------
        :class:`orion.core.utils.exceptions.WaitingForTrials`
            if the experiment is not completed and algorithm needs to wait for some
            trials to complete before it can suggest new trials.

        :class:`orion.core.utils.exceptions.BrokenExperiment`
            if too many trials failed to run and the experiment cannot continue.
            This is determined by ``max_broken`` in the configuration of the experiment.

        :class:`orion.core.utils.exceptions.SampleTimeout`
            if the algorithm of the experiment could not sample new unique points.

        :class:`orion.core.utils.exceptions.UnsupportedOperation`
            If the experiment was not loaded in executable mode.

        
Suggest a trial to execute.
Experiment must be in executable ('x') mode.

If any trial is available (new or interrupted), it selects one and reserves it.
Otherwise, the algorithm is used to generate a new trial that is registered in storage and
reserved.

Returns

`orior.core.worker.trial.Trial` or None
Reserved trial for execution. Will return None if experiment is done.
of if the algorithm cannot suggest until other trials complete.

Raises
Suggest a trial to execute . Experiment must be in executable ( ' x ' ) mode . If any trial is available ( new or interrupted ) it selects one and reserves it . Otherwise the algorithm is used to generate a new trial that is registered in storage and reserved . Returns ` orior . core . worker . trial . Trial ` or None Reserved trial for execution . Will return None if experiment is done . of if the algorithm cannot suggest until other trials complete . Raises
def suggest(self):
        self._check_if_executable()
        if self.is_broken:
            raise BrokenExperiment("Trials failed too many times")
        if self.is_done:
            return None
        try:
            trial = orion.core.worker.reserve_trial(self._experiment, self._producer)
        except WaitingForTrials as e:
            if self.is_broken:
                raise BrokenExperiment("Trials failed too many times") from e
            raise e
        except SampleTimeout as e:
            if self.is_broken:
                raise BrokenExperiment("Trials failed too many times") from e
            raise e
        if trial is not None:
            self._maintain_reservation(trial)
        return trial
def suggest ( self ) : self . _check_if_executable ( ) if self . is_broken : raise BrokenExperiment ( "Trials failed too many times" ) if self . is_done : return None try : trial = orion . core . worker . reserve_trial ( self . _experiment , self . _producer ) except WaitingForTrials as e : if self . is_broken : raise BrokenExperiment ( "Trials failed too many times" ) from e raise e except SampleTimeout as e : if self . is_broken : raise BrokenExperiment ( "Trials failed too many times" ) from e raise e if trial is not None : self . _maintain_reservation ( trial ) return trial
Suggest a trial to execute.
Suggest a trial to execute .
"""Suggest a trial to execute.

        Experiment must be in executable ('x') mode.

        If any trial is available (new or interrupted), it selects one and reserves it.
        Otherwise, the algorithm is used to generate a new trial that is registered in storage and
        reserved.

        Returns
        -------
        `orior.core.worker.trial.Trial` or None
            Reserved trial for execution. Will return None if experiment is done.
            of if the algorithm cannot suggest until other trials complete.

        Raises
        ------
        :class:`orion.core.utils.exceptions.WaitingForTrials`
            if the experiment is not completed and algorithm needs to wait for some
            trials to complete before it can suggest new trials.

        :class:`orion.core.utils.exceptions.BrokenExperiment`
            if too many trials failed to run and the experiment cannot continue.
            This is determined by ``max_broken`` in the configuration of the experiment.

        :class:`orion.core.utils.exceptions.SampleTimeout`
            if the algorithm of the experiment could not sample new unique points.

        :class:`orion.core.utils.exceptions.UnsupportedOperation`
            If the experiment was not loaded in executable mode.

        """
self
class
`orion.core.utils.exceptions.WaitingForTrials`
if the experiment is not completed and algorithm needs to wait for some
trials to complete before it can suggest new trials.
` orion . core . utils . exceptions . WaitingForTrials ` if the experiment is not completed and algorithm needs to wait for some trials to complete before it can suggest new trials .
class
`orion.core.utils.exceptions.BrokenExperiment`
if too many trials failed to run and the experiment cannot continue.
This is determined by ``max_broken`` in the configuration of the experiment.
` orion . core . utils . exceptions . BrokenExperiment ` if too many trials failed to run and the experiment cannot continue . This is determined by ` ` max_broken ` ` in the configuration of the experiment .
class
`orion.core.utils.exceptions.SampleTimeout`
if the algorithm of the experiment could not sample new unique points.
` orion . core . utils . exceptions . SampleTimeout ` if the algorithm of the experiment could not sample new unique points .
class
`orion.core.utils.exceptions.UnsupportedOperation`
If the experiment was not loaded in executable mode.
` orion . core . utils . exceptions . UnsupportedOperation ` If the experiment was not loaded in executable mode .