noether.core.schedules.base

Classes

ScheduleBase

Base class for schedules.

ProgressSchedule

Base class for schedules that progress monotonically in value over time.

DecreasingProgressSchedule

Base class for schedules that monotonically decrease in value over time.

IncreasingProgressSchedule

Base class for schedules that monotonically increase in value over time.

SequentialPercentScheduleConfig

SequentialPercentSchedule

A scheduler that switches between multiple schedules based on the percentage of steps completed.

SequentialStepScheduleConfig

SequentialStepSchedule

A scheduler that switches between multiple schedules based on the step number.

Module Contents

class noether.core.schedules.base.ScheduleBase(overhang_percent=None, overhang_steps=None)

Base class for schedules.

Initialize the scheduler.

Parameters:
  • overhang_percent (float | None) – The percentage by which the schedule is artificially prolonged.

  • overhang_steps (int | None) – The number of steps by which the schedule is artificially prolonged.

overhang_percent = None
overhang_steps = None
get_value(step, total_steps)

Get the value of the schedule at a given step.

This function includes the correction for overhangs in percent or steps and then calls the _get_value method. Therefore, it should not be overwritten by subclasses. Instead, the _get_value method should be implemented.

Parameters:
  • step (int) – The step for which to get the scheduler value.

  • total_steps (int) – The total number of steps.

Return type:

float

class noether.core.schedules.base.ProgressSchedule(config, start_value, delta)

Bases: ScheduleBase

Base class for schedules that progress monotonically in value over time.

Initialize the scheduler.

Parameters:
  • config (noether.core.schemas.schedules.ProgressScheduleConfig) – Configuration for the progress schedule.

  • start_value (float) – The initial value of the scheduler.

  • delta (float) – The total change in value over the schedule.

start_value
delta
exclude_first
exclude_last
class noether.core.schedules.base.DecreasingProgressSchedule(config)

Bases: ProgressSchedule

Base class for schedules that monotonically decrease in value over time.

Initialize the scheduler.

Parameters:

config (noether.core.schemas.schedules.DecreasingProgressScheduleConfig)

class noether.core.schedules.base.IncreasingProgressSchedule(config)

Bases: ProgressSchedule

Base class for schedules that monotonically increase in value over time.

Initialize the scheduler.

Parameters:

config (noether.core.schemas.schedules.IncreasingProgressScheduleConfig)

class noether.core.schedules.base.SequentialPercentScheduleConfig
schedule: ScheduleBase
start_percent: float | None = None
end_percent: float | None = None
class noether.core.schedules.base.SequentialPercentSchedule(schedule_configs)

Bases: ScheduleBase

A scheduler that switches between multiple schedules based on the percentage of steps completed.

Initialize the scheduler.

Parameters:
schedule_configs
get_sequential_schedule_config(step, total_steps)
Parameters:
  • step (int)

  • total_steps (int)

Return type:

SequentialPercentScheduleConfig | None

class noether.core.schedules.base.SequentialStepScheduleConfig
schedule: ScheduleBase
start_step: int | None = None
end_step: int | None = None
class noether.core.schedules.base.SequentialStepSchedule(schedule_configs, **kwargs)

Bases: ScheduleBase

A scheduler that switches between multiple schedules based on the step number.

Initialize the scheduler.

Parameters:
schedule_configs
get_sequential_schedule_config(step)
Parameters:

step (int)

Return type:

SequentialStepScheduleConfig | None