noether.core.schedules.step

Classes

StepDecreasingScheduleConfig

StepDecreasingSchedule

A scheduler that decreases exponentially from the maximum to minimum value over the total number of steps.

StepFixedScheduleConfig

StepFixedSchedule

A scheduler that progresses at fixed steps and increases or decreases by some factor at these steps.

StepIntervalScheduleConfig

StepIntervalSchedule

A scheduler that progresses at fixed intervals and increases or decreases by some factor at these intervals.

Module Contents

class noether.core.schedules.step.StepDecreasingScheduleConfig(/, **data)

Bases: noether.core.schedules.schemas.DecreasingProgressScheduleConfig

Parameters:

data (Any)

kind: Literal['noether.core.schedules.StepDecreasingSchedule'] = 'noether.core.schedules.StepDecreasingSchedule'

The fully qualified class name of the scheduler.

factor: float = None

The factor by which the value decreases.

decreases_interval: float = None

The interval in range [0, 1] at which the value decreases.

check_interval()

Ensures that ‘interval’ is a float in the range (0, 1).

Return type:

StepDecreasingScheduleConfig

class noether.core.schedules.step.StepDecreasingSchedule(config)

Bases: noether.core.schedules.base.DecreasingProgressSchedule

A scheduler that decreases exponentially from the maximum to minimum value over the total number of steps.

Example

schedule_config:
    kind: noether.core.schedules.StepDecreasingSchedule
    factor: 0.1
    decreases_interval: 0.01
    max_value: ${model.optim.lr}

I.e., after each 1% of the total training steps, the value is multiplied by 0.1.

Parameters:

config (StepDecreasingScheduleConfig) – The configuration for the scheduler. See StepDecreasingScheduleConfig for details.

factor
decreases_interval
class noether.core.schedules.step.StepFixedScheduleConfig(/, **data)

Bases: noether.core.schedules.schemas.ScheduleBaseConfig

Parameters:

data (Any)

kind: Literal['noether.core.schedules.StepFixedSchedule'] = 'noether.core.schedules.StepFixedSchedule'

The fully qualified class name of the scheduler.

start_value: float = None

The initial value of the scheduler.

factor: float = None

The factor by which the value is multiplied after reaching the next step provided in steps.

steps: list[float] = None

The steps at which the value changes, must be a list of floats in the range (0, 1).

validate_steps()

Ensures that ‘steps’ is a non-empty list of floats in the range (0, 1).

Return type:

StepFixedScheduleConfig

class noether.core.schedules.step.StepFixedSchedule(config)

Bases: noether.core.schedules.base.ScheduleBase

A scheduler that progresses at fixed steps and increases or decreases by some factor at these steps.

Parameters:

config (StepFixedScheduleConfig) – Configuration for the step fixed schedule.

Example:

schedule_config:
    kind: noether.core.schedules.StepFixedSchedule
    factor: 0.1
    start_value: ${model.optim.lr}
    steps:
        - 0.01
        - 0.02
        - 0.03

Lower LR by factor 0.1 at 1%, 2%, and 3% of total training steps.

steps
start_value
factor
class noether.core.schedules.step.StepIntervalScheduleConfig(/, **data)

Bases: noether.core.schedules.schemas.ScheduleBaseConfig

Parameters:

data (Any)

kind: Literal['noether.core.schedules.StepIntervalSchedule'] = 'noether.core.schedules.StepIntervalSchedule'

The fully qualified class name of the scheduler.

start_value: float = None

The initial value of the scheduler. I.e, the learning rate at step 0.

factor: float = None

The factor by which the value is multiplied after reaching the next interval.

update_interval: float = None

The interval in range (0, 1) at which the value changes.

check_update_interval(v)

Ensures that ‘update_interval’ is a float in the range (0, 1).

Parameters:

v (float)

Return type:

float

class noether.core.schedules.step.StepIntervalSchedule(config)

Bases: noether.core.schedules.base.ScheduleBase

A scheduler that progresses at fixed intervals and increases or decreases by some factor at these intervals.

Parameters:

config (StepIntervalScheduleConfig) – Configuration for the step interval schedule.

Example:

schedule_config:
    kind: noether.core.schedules.StepIntervalSchedule
    start_value: 1.0
    factor: 0.5
    update_interval: 0.01
start_value
factor
update_interval