Skip to content

ExternalGreyBoxModel: Implement hessian methods on base class #3518

Open
@michaelbynum

Description

@michaelbynum

Summary

In pynumero/interfaces/external_grey_box.py, ExternalGreyBoxModel works both with and without hessians. To use hessians, a derived class must implement a few methods as described in the doc string. However, there is not a default implementation of these in the base class with NotImplementedError. Then, the _ExternalGreyBoxAsNLP uses hasattr to see if hessians should be used (

self._has_hessian_support = True
). We should do this differently (e.g., try/except, has_hessian method, etc.)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions