deepcave.runs.recorder

# Recorder

This module provides utilities to record information.

## Classes
  • Recorder: Define a Recorder for recording information.

Classes

Recorder(configspace[, objectives, meta, ...])

Define a Recorder for recording information.

class deepcave.runs.recorder.Recorder(configspace, objectives=None, meta=None, save_path='logs', prefix='run', overwrite=False)[source]

Bases: object

Define a Recorder for recording information.

Properties

pathPath

The path to the recorded information.

last_trial_idtuple[Any, Optional[float], Optional[int]]

The last id containing the configuration, budget, and seed.

start_timefloat

The current time in seconds since the epoch.

start_timesDict[Any, Any]

A dictionary containing the start times with their id as key.

modelsDict[Any, Any|

The models used with their id as key.

originsDict[Any, Any]

The origins with their id as key.

additionalsDict[Any, Any]

Additional information with the id as key.

runDeepCAVERun

The deepcave run container.

end(costs=inf, status=Status.SUCCESS, config=None, budget=inf, seed=-1, additional=None, end_time=None)[source]

End the recording and add it to the trial history.

In case of multi-fidelity, config+budget should be passed. In case of non-deterministic runs, seed should be passed. If it can’t be passed, it can’t be matched correctly.

Parameters:
  • costs (float, optional) – The costs. Default is np.inf.

  • status (Status, optional) – The status. Default is Status.Success.

  • config (Union[dict, Configuration], optional) – The configuration. Default is None.

  • budget (float, optional) – The budget. Default is np.inf.

  • seed (int) – The seed. Default is -1.

  • additional (Optional[dict], optional) – Additional information. Default is None.

  • end_time (Optional[float], optional) – The end time. Default is None.

Raises:

AssertionError – If no trial was started yet.

Return type:

None

start(config, budget=None, seed=-1, model=None, origin=None, additional=None, start_time=None)[source]

Start recording the information.

Parameters:
  • config (Configuration) – Holds the configuration settings.

  • budget (Optional[float], optional) – The budget. Default is None.

  • seed (int) – The seed. Default is -1.

  • model (Optional[Any], optional) – The model used. Default is None.

  • origin (Optional[str], optional) – The origin. Default is None.

  • additional (Optional[dict], optional) – Additional information. Default is None.

  • start_time (Optional[float], optional) – The start time. Default is None.

Return type:

None