deephyper.evaluator.HPOJob

deephyper.evaluator.HPOJob#

class deephyper.evaluator.HPOJob(id, args: dict, run_function: Callable, storage: Storage)[source]#

Bases: Job

Represents the execution of a run_function for HPO by the Evaluator.

Parameters:
  • id (str) – unique identifier of the job. Usually an integer.

  • args (dict) – argument dictionnary of the run_function.

  • run_function (callable) – function executed by the Evaluator.

  • storage (Storage) – the storage client passed to the run_function.

Methods

create_running_job

set_output

standardize_output

Transform the output of the run-function to its standard form.

Attributes

objective

Objective returned by the run-function.

status

property objective#

Objective returned by the run-function.

static standardize_output(output: str | float | tuple | list | dict) dict[source]#

Transform the output of the run-function to its standard form.

Possible return values of the run-function are:

>>> 0
>>> 0, 0
>>> "F_something"
>>> {"objective": 0 }
>>> {"objective": (0, 0), "metadata": {...}}
Parameters:

output (Union[str, float, tuple, list, dict]) – the output of the run-function.

Returns:

standardized output of the function.

Return type:

dict