pylbfgs icon indicating copy to clipboard operation
pylbfgs copied to clipboard

Exceptions in callbacks are not handled properly

Open larsmans opened this issue 12 years ago • 0 comments

Exceptions occurring in the evaluation or progress reporting callbacks currently cause a print to stderr and an LBFGSError because the wrong value is returned from the callback:

Exception UnboundLocalError: "local variable 'f_calls' referenced before assignment" in 'lbfgs._lowlevel.call_eval' ignored

The exception should be passed up instead.

larsmans avatar May 20 '12 09:05 larsmans