TaskTimer
- class lightautoml.utils.timer.TaskTimer(pipe_timer, key=None, score=1.0, overhead=1, mode=1, default_tuner_time_rate=0.7)[source]
Bases:
lightautoml.utils.timer.Timer
Timer is used to control time over single ML task run.
It decides how much time is ok to spend on tuner and if we have enough time to calc more folds.
- __init__(pipe_timer, key=None, score=1.0, overhead=1, mode=1, default_tuner_time_rate=0.7)[source]
- Parameters
pipe_timer (
PipelineTimer
) – Global automl timer.key (
Optional
[str
]) – String name that will be associated with this task.score (
float
) – Time score for current task. For ex. if you want to give more of total time to task set it > 1.overhead (
Optional
[float
]) – See overhead ofPipelineTimer
.mode (
int
) – See mode forPipelineTimer
.default_tuner_time_rate (
float
) – If no timing history for the moment of estimating tuning time, timer will use this rate of time_left.
- estimate_tuner_time(n_folds=1)[source]
Estimates time that is ok to spend on tuner.
- Return type
- Returns
How much time timer will be able spend on tuner.