cottax.relational.consumers.execution.jax_solvers.scipy_slsqp module¶
scipy’s SLSQP answering a ConstrainedMinimiser: host callback.
- type Unravel = Callable[[Array], tuple[Any, ...]]¶
- class SLSQP(tol: float = 1e-08, max_steps: int = 200, strict: bool = True, jacobian: Callable = <function jacfwd>)[source]¶
Bases:
DriverImplementation[ConstrainedMinimiser]scipy.optimize.minimize(method=’SLSQP’) on the canonical form: the objective, the equalities as eq, the inequalities negated as ineq (scipy’s >= 0), and the box as scipy’s bounds, so every iterate stays inside it.
- needs: AbstractClassVar[frozenset[type[Role]]] = frozenset({<class 'cottax.core.driven.roles.Start'>})¶
- provides: AbstractClassVar[frozenset[type[Role]]] = frozenset({<class 'cottax.core.driven.roles.Steps'>})¶
- tol: float = 1e-08¶
- max_steps: int = 200¶
- strict: bool = True¶
Raise when scipy does not report success; off, the answer is taken as it stands.
- jacobian(argnums: int | Sequence[int] = 0, has_aux: bool = False, holomorphic: bool = False)¶
How the Jacobian is taken: jax.jacfwd, jax.jacrev, or any hashable function of a function, such as one pulling rows back one at a time to save memory.
- Return type:
Callable
- implements¶
alias of
ConstrainedMinimiser
- SCIPY = (('eq', 'equalities', 1.0), ('ineq', 'inequalities', -1.0))¶
g <= 0 is scipy’s -g >= 0.
- Type:
Each constraint group as scipy’s kind, and its sign