Skip to contents

This class logs the runtime of the algorithm. The logger also can be used to stop the algorithm after a defined time budget. The available time units are:

  • minutes

  • seconds

  • microseconds

Format

S4 object.

Arguments

logger_id

(character(1))
Identifier of the logger.

use_as_stopper

(logical(1))
Boolean to indicate if the logger should also be used as a stopper.

max_time

(integer(1))
If the logger is used as stopper this argument contains the maximal time which are available to train the model.

time_unit

(character(1))
The unit in which the time is measured. Choices are minutes, seconds or microseconds.

Usage


LoggerTime$new(logger_id, use_as_stopper, max_time, time_unit)

Fields

This class doesn't contain public fields.

Methods

  • $summarizeLogger(): () -> ()

Examples

# Define logger:
log_time = LoggerTime$new("time_minutes", FALSE, 20, "minutes")

# Summarize logger:
log_time$summarizeLogger()
#> Time logger:
#> 	- Tracked time unit: minutes