nemos.solvers.SolverSpec#

class nemos.solvers.SolverSpec(algo_name, backend, implementation)[source]#

Bases: object

Solver specification representing an entry in the solver registry.

A solver is specified by: - the name of the algorithm it implements - its backend (optimization library or custom) - the class implementing the optimization method

(ideally compatible with the AbstractSolver and SolverProtocol interface)

Examples

>>> import nemos as nmo
>>> spec = nmo.solvers.SolverSpec("BFGS", "optimistix", nmo.solvers._optimistix_solvers.OptimistixBFGS)
>>> spec.algo_name
'BFGS'
>>> spec.backend
'optimistix'
>>> spec.implementation
<class 'nemos.solvers._optimistix_solvers.OptimistixBFGS'>

Attributes

Parameters:
__init__(algo_name, backend, implementation)#
Parameters:
Return type:

None

Methods

__init__(algo_name, backend, implementation)

algo_name: str#
backend: str#
property full_name: str#
implementation: Type[SolverProtocol]#