PipelineTimer

class lightautoml.utils.timer.PipelineTimer(timeout=None, overhead=0.1, mode=1, tuning_rate=0.7)[source]

Bases: Timer

Timer is used to control time over full automl run.

It decides how much time spend to each algo

Parameters
  • timeout (Optional[float]) – Maximum amount of time that AutoML can run.

  • overhead (float) – (0, 1) - Rate of time that will be used to early stop. Ex. if set to 0.1 and timing mode is set to 2, timer will finish tasks after 0.9 of all time spent.

  • mode (int) – Timing mode. Can be 0, 1 or 2. Keep in mind - all time limitations will turn on after at least single model/single fold will be computed.

  • tuning_rate (float) – Approximate fraction of all time will be used for tuning.

Note

Modes explanation:

  • 0 - timer is used to estimate runtime,

    but if something goes out of time, keep it run (Real life mode).

  • 1 - timer is used to terminate tasks,

    but do it after real timeout (Trade off mode).

  • 2 - timer is used to terminate tasks

    with the goal to be exactly in time (Benchmarking/competitions mode).