ksuit.utils.training.schedule_wrapper

Classes

ScheduleWrapper

Wrapper around a schedule that handles getting the value based on an UpdateCounter and whether the schedule is

Module Contents

class ksuit.utils.training.schedule_wrapper.ScheduleWrapper(schedule, update_counter=None, interval='update')

Wrapper around a schedule that handles getting the value based on an UpdateCounter and whether the schedule is based on updates or epochs.

Parameters:
  • schedule (ksuit.schedules.ScheduleBase) – The schedule to wrap.

  • update_counter (ksuit.utils.training.counter.UpdateCounter | None) – The UpdateCounter to use for getting the current step. If None, the schedule is assumed to be constant.

  • interval (Literal['update', 'epoch']) – Whether the schedule is based on updates or epochs. Interval should be either “update” or “epoch”.

schedule
update_counter = None
interval = 'update'
get_value()

Get the current value of the schedule based on the current step in the UpdateCounter.

Return type:

float