pylbfgs icon indicating copy to clipboard operation
pylbfgs copied to clipboard

[ENH] Raising exceptions instead of printing warnings for errors.

Open wolfgang-noichl opened this issue 8 years ago • 2 comments

Currently, it is not possible to react on LBFGS errors in a meaningful way:

Quite some errors (eg LBFGSERR_MAXIMUMITERATION) wouldn't render the result completely useless - one might be still interested in x. However, since they trigger an exception, x is not accessible anymore. Just issueing a warning for these doesn't seem a good idea either, since a warning cannot be dealt with in an automatic way.

This is a vague proposal on how to do this differently:

  • all warnings are replaced by (different!) exceptions
  • because these would prevent returning x, x can (optionally) be written back to a parameter.

There might be a more clean way to do this, I'm happy for suggestions

wolfgang-noichl avatar Apr 07 '16 10:04 wolfgang-noichl