topobench.optimizer.base module#

Abstract class for the optimizer manager class.

class ABC#

Bases: object

Helper class that provides a standard way to create an ABC using inheritance.

class AbstractOptimizer#

Bases: ABC

Abstract class for the optimizer manager class.

abstract configure_optimizer(model_parameters)#

Configure the optimizer and scheduler.

Act as a wrapper.

Parameters:
model_parametersdict

The model parameters.

abstractmethod(funcobj)#

A decorator indicating abstract methods.

Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract methods are overridden. The abstract methods can be called using any of the normal ‘super’ call mechanisms. abstractmethod() may be used to declare abstract methods for properties and descriptors.

Usage:

class C(metaclass=ABCMeta):

@abstractmethod def my_abstract_method(self, …):