eta_utility.eta_x.common.schedules module

class eta_utility.eta_x.common.schedules.BaseSchedule[source]

Bases: ABC

BaseSchedule provides basic functionality for the implementation of new schedules. Each schedule should define a value function.

abstract value(progress_remaining: float) float[source]

Calculate the value of the learning rate based on the remaining progress.

Parameters:

progress_remaining – Remaining progress, which is calculated in the base class: 1 (start), 0 (end).

Returns:

Output value.

class eta_utility.eta_x.common.schedules.LinearSchedule(initial_p: float, final_p: float)[source]

Bases: BaseSchedule

Linear interpolation schedule adjusts the learning rate between initial_p and final_p. The value is calculated based on the remaining progress, which is between 1 (start) and 0 (end).

Parameters:
  • initial_p – Initial output value.

  • final_p – Final output value.

value(progress_remaining: float) float[source]

Calculate the value of the learning rate based on the remaining progress.

Parameters:

progress_remaining – Remaining progress, which is calculated in the base class: 1 (start), 0 (end).

Returns:

Output value.