mpcrl.core.schedulers.Scheduler#

class mpcrl.core.schedulers.Scheduler(init_value)[source]#

Bases: ABC, Generic[ScType]

Base abstract class for schedulers.

Schedulers are helpful classes to update or decay different quantities, such as learning rates or exploration probability.

Parameters:
init_valuesupports-algebraic-operations

Initial value that will be updated by this scheduler.

Notes

If the scheduler has a final iteration, it is expected to raise a StopIteration when the last iteration is reached.

Methods

step()

Updates the value of the scheduler by one step.

abstractmethod step()[source]#

Updates the value of the scheduler by one step.

Raises:
StopIteration

Raises if the final iteration of the scheduler (if any) has been reached and step was called again.

Return type:

None