noether.core.schemas.schedules

Attributes

Classes

Module Contents

class noether.core.schemas.schedules.ScheduleBaseConfig(/, **data)

Bases: pydantic.BaseModel

Parameters:

data (Any)

kind: str | None = None

The fully qualified class name of the scheduler.

overhang_percent: float | None = None

The percentage by which the schedule is artificially prolonged. Mutually exclusive with overhang_steps.

overhang_steps: int | None = None

The number of steps by which the schedule is artificially prolonged. Mutually exclusive with overhang_percent.

start_value: float = None
end_value: float = None
weight_decay: float | None = None
start_percent: float | None = None

The percentage of steps at which the schedule starts.

end_percent: float | None = None

The percentage of steps at which the schedule ends.

start_step: int | None = None

The step at which the schedule starts.

end_step: int | None = None

The step at which the schedule ends.

interval: Literal['update', 'epoch'] = None

Whether the schedule is based on updates or epochs. Interval should be either “update” or “epoch”. Default is “update”. Under the hood steps is always used. However, when “epoch” is selected here, the step count is derived from epochs via the UpdateCounter.

check_mutual_exclusion()

Ensures that ‘overhang_percent’ and ‘overhang_steps’ are mutually exclusive.

Return type:

ScheduleBaseConfig

validate_start_end_steps()
Return type:

ScheduleBaseConfig

validate_start_end_percents()
Return type:

ScheduleBaseConfig

class noether.core.schemas.schedules.ProgressScheduleConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

exclude_first: bool = None

Whether to exclude the first value of the schedule.

exclude_last: bool = None

Whether to exclude the last value of the schedule.

class noether.core.schemas.schedules.SchedulerConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

kind: Literal['noether.core.schedules.scheduler.SchedulerConfig'] = 'noether.core.schedules.scheduler.SchedulerConfig'

The fully qualified class name of the scheduler.

warmup_percent: float = None
end_value: float = None
class noether.core.schemas.schedules.DecreasingProgressScheduleConfig(/, **data)

Bases: ProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

max_value: float = None

Maximum (starting) value of the schedule.

end_value: float = None

Minimum (ending) value of the schedule.

class noether.core.schemas.schedules.IncreasingProgressScheduleConfig(/, **data)

Bases: ProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

start_value: float = None
max_value: float | None = None

Minimum (starting) value of the schedule.

class noether.core.schemas.schedules.ConstantScheduleConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

value: float

The constant value that will be returned for all steps. Value should be equal to the learning rate defined in the optimizer.

class noether.core.schemas.schedules.CustomScheduleConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

values: list[float]

The list of values that will be returned for each step. Values show ben as long as the number of steps.

class noether.core.schemas.schedules.LinearWarmupCosineDecayScheduleConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

warmup_steps: int | None = None

The number of steps to linearly increase the value from start to max.

warmup_percent: float | None = None

The percentage of steps to linearly increase the value from start to max.

max_value: float = None

The maximum value of the scheduler from which to start the cosine decay phase. This should be equal to the learning rate defined in the optimizer. I.e., max value is learning rate

validate_warmup()

Ensures that exactly one of ‘warmup_steps’ or ‘warmup_percent’ is specified.

Return type:

LinearWarmupCosineDecayScheduleConfig

class noether.core.schemas.schedules.LinearIncreasingScheduleConfig(/, **data)

Bases: IncreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

class noether.core.schemas.schedules.LinearDecreasingScheduleConfig(/, **data)

Bases: DecreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

class noether.core.schemas.schedules.PeriodicBoolScheduleConfig(/, **data)

Bases: ScheduleBaseConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

initial_state: bool

The initial (boolean) state of the scheduler (on or off).

off_value: float = None

The value to return when the scheduler is in the off state.

on_value: float = None

The value to return when the scheduler is in the on state.

off_duration: int = None

The number of steps the scheduler is in the off state.

on_duration: int = None

The number of steps the scheduler is in the on state.

invert: bool = None

Whether to invert the scheduler, i.e. return off_value when on and vice versa.

class noether.core.schemas.schedules.PolynomialDecreasingScheduleConfig(/, **data)

Bases: DecreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

power: float = None

The power of the polynomial function.

class noether.core.schemas.schedules.PolynomialIncreasingScheduleConfig(/, **data)

Bases: IncreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

power: float = None

The power of the polynomial function.

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

Bases: 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.schemas.schedules.StepFixedScheduleConfig(/, **data)

Bases: 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.schemas.schedules.StepIntervalScheduleConfig(/, **data)

Bases: 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.schemas.schedules.CosineDecreasingScheduleConfig(/, **data)

Bases: DecreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

class noether.core.schemas.schedules.CosineIncreasingScheduleConfig(/, **data)

Bases: IncreasingProgressScheduleConfig

Parameters:

data (Any)

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

The fully qualified class name of the scheduler.

noether.core.schemas.schedules.AnyScheduleConfig