linear

cockpit.utils.schedules.linear(interval, offset=0)[source]

Creates a linear schedule that tracks when {offset + n interval | n >= 0}.

Parameters
  • interval (int) – The regular tracking interval.

  • offset (int, optional) – Offset of tracking. Defaults to 0.

Returns

Function that given the global_step returns whether it should track.

Return type

callable