deepcave.runs.trial

# Trial

This module provides the trial object. Utilities for handling the trial are provided.

## Classes
  • Trial: This class provides the trial object itself and multiple handling utilities.

Classes

Trial(config_id, budget, seed, costs, ...)

Provide the trial object itself and multiple handling utilities.

class deepcave.runs.trial.Trial(config_id, budget, seed, costs, start_time, end_time, status, additional)[source]

Bases: object

Provide the trial object itself and multiple handling utilities.

Properties

statusStatus

The status of the trial.

config_idint

The identificator of the configuration.

budgetUnion[int, float]

The budget for the trial.

seed: int

The seed for the trial.

costsList[float]

A list of the costs of the trial.

start_timefloat

The start time of the trial.

end_timefloat

The end time of the trial.

additionalDict[str, Any]

A dictionary of additional information of the trial.

__post_init__()[source]

Set the status.

Return type:

None

get_key()[source]

Generate a key based on the configuration id and the budget.

Returns:

A Tuple representing a unique key based on the configuration id, budget, and seed.

Return type:

Tuple[int, Optional[Union[int, float]], Optional[int]]

to_json()[source]

Convert trial object to JSON-compatible representation.

Returns:

A JSON-compatible list with the Trials attributes.

Return type:

List[Any]