Add logger.warning when falling back to Newton method (#950)

This adds logger.warning when we fall back to Newton method.
This commit is contained in:
Jerry Prawiharjo 2019-05-02 14:34:24 -07:00 committed by Ben Letham
parent f9adb9623e
commit c11e668c0d

View file

@ -1119,6 +1119,7 @@ class Prophet(object):
params = model.optimizing(**args)
except RuntimeError:
# Fall back on Newton
logger.warning('Default optimization returns with an error. Falling back to Newton method.')
args['algorithm'] = 'Newton'
params = model.optimizing(**args)