Format trials¶
Utility functions for formatting data¶
Conversion functions between various data types used in framework’s ecosystem.
- orion.core.utils.format_trials.dict_to_trial(data, space)[source]¶
Create a
orion.core.worker.trial.Trial
object from data, filling only parameter information from data.- Parameters
data – A dict representing a sample point from space.
space (
orion.algo.space.Space
) – Definition of problem’s domain.
- orion.core.utils.format_trials.get_trial_results(trial)[source]¶
Format results from a
orion.core.worker.trial.Trial
using standard structures.
- orion.core.utils.format_trials.standard_param_name(name)[source]¶
Convert parameter name to namespace format
- orion.core.utils.format_trials.trial_to_tuple(trial, space)[source]¶
Extract a parameter tuple from a
orion.core.worker.trial.Trial
.The order within the tuple is dictated by the defined
orion.algo.space.Space
object.
- orion.core.utils.format_trials.tuple_to_trial(data, space, status='new')[source]¶
Create a
orion.core.worker.trial.Trial
object from data.- Parameters
- data: tuple
A tuple representing a sample point from space.
- space: `orion.algo.space.Space`
Definition of problem’s domain.
- status: str, optional
Status of the trial. One of
orion.core.worker.trial.Trial.allowed_stati
.
- Returns
- A trial object
orion.core.worker.trial.Trial
.
- A trial object