Commandline client¶
Helper function for returning results from script¶
- orion.client.cli.report_bad_trial(objective=10000000000.0, name='objective', data=None)[source]¶
Report a bad trial with large objective to Oríon.
This is especially useful if some parameter values lead to exceptions such as out of memory. Reporting a large objective from such trials will push algorithms towards valid configurations.
Warning
To be called only once in order to report a final evaluation of a particular trial.
Warning
Oríon is only minimizing. Make sure to report a metric that you seek to minimize.
Note
In case that user’s script is not running in a orion’s context, this function will act as a Python print function.
- Parameters
- objective: float
Objective the return to Oríon for the current trial. The default objective is 1e10. This may not be valid for some metrics and this value should be overridden accordingly. In the case of error rates for instance, the value should be 1.0.
- name: str, optional
Name of the objective. Default is ‘objective’.
- data: list of dict, optional
A list of dictionary representing the results in the form dict(name=result_name, type=’statistic’, value=0). The types supported are ‘contraint’, ‘gradient’ and ‘statistic’.
- orion.client.cli.report_objective(objective, name='objective')[source]¶
Report only the objective at the end of execution
To send more data (statistic, constraint, gradient), use
report_results
.Warning
To be called only once in order to report a final evaluation of a particular trial.
Warning
Oríon is only minimizing. Make sure to report a metric that you seek to minimize.
Note
In case that user’s script is not running in a orion’s context, this function will act as a Python print function.
- Parameters
- objective: float
Objective the return to Oríon for the current trial.
- name: str, optional
Name of the objective. Default is ‘objective’.
- orion.client.cli.report_results(data)[source]¶
Facilitate the reporting of results for a user’s script acting as a black-box computation.
Warning
To be called only once in order to report a final evaluation of a particular trial.
Warning
Oríon is only minimizing. Make sure to report a metric that you seek to minimize.
Note
In case that user’s script is not running in a orion’s context, this function will act as a Python print function.
- Parameters
- data: list of dict
A list of dictionary representing the results in the form dict(name=result_name, type=’statistic’, value=0). The types supported are ‘objective’, ‘contraint’, ‘gradient’ and ‘statistic’. The list should contain at least one ‘objective’, which is the metric the algorithm will be minimizing.