Strategy¶
Parallel Strategies¶
Register objectives for incomplete trials.
Parallel strategy objects can be created using strategy_factory.create(‘strategy_name’).
- class orion.core.worker.strategy.MaxParallelStrategy(default_result=inf)[source]¶
Parallel strategy that uses the max of completed objectives
- Attributes
configuration
Provide the configuration of the strategy as a dictionary.
Methods
lie
(trial)See ParallelStrategy.lie
observe
(trials)See ParallelStrategy.observe
- property configuration¶
Provide the configuration of the strategy as a dictionary.
- class orion.core.worker.strategy.MeanParallelStrategy(default_result=inf)[source]¶
Parallel strategy that uses the mean of completed objectives
- Attributes
configuration
Provide the configuration of the strategy as a dictionary.
Methods
lie
(trial)See ParallelStrategy.lie
observe
(trials)See ParallelStrategy.observe
- property configuration¶
Provide the configuration of the strategy as a dictionary.
- class orion.core.worker.strategy.NoParallelStrategy(*args, **kwargs)[source]¶
No parallel strategy
Methods
lie
(trial)See ParallelStrategy.lie
observe
(trials)See ParallelStrategy.observe
- class orion.core.worker.strategy.ParallelStrategy(*args, **kwargs)[source]¶
Strategy to give intermediate results for incomplete trials
- Attributes
configuration
Provide the configuration of the strategy as a dictionary.
Methods
lie
(trial)Construct a fake result for an incomplete trial
observe
(trials)Observe completed trials
- property configuration¶
Provide the configuration of the strategy as a dictionary.
- lie(trial)[source]¶
Construct a fake result for an incomplete trial
- Parameters
- trial: `orion.core.worker.trial.Trial`
A trial object which is not supposed to be completed.
- Returns
orion.core.worker.trial.Trial.Result
The fake objective result corresponding to the trial given.
Notes
If the trial has an objective even if not completed, a warning is printed to user with a pointer to documentation to resolve the database corruption. The result returned is the corresponding objective instead of the lie.
- observe(trials)[source]¶
Observe completed trials
See also
- Parameters
- trials: list of ``orion.core.worker.trial.Trial``
Trials from a
orion.algo.space.Space
.
- class orion.core.worker.strategy.StubParallelStrategy(stub_value=None)[source]¶
Parallel strategy that returns static objective value for incompleted trials.
- Attributes
configuration
Provide the configuration of the strategy as a dictionary.
Methods
lie
(trial)See ParallelStrategy.lie
observe
(trials)See ParallelStrategy.observe
- property configuration¶
Provide the configuration of the strategy as a dictionary.