mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 20:42:39 +02:00
fix for parallel optimization
This commit is contained in:
parent
627c878455
commit
221f7f792f
1 changed files with 2 additions and 1 deletions
|
|
@ -562,11 +562,12 @@ class GP(Model):
|
||||||
"""
|
"""
|
||||||
self.inference_method.on_optimization_start()
|
self.inference_method.on_optimization_start()
|
||||||
try:
|
try:
|
||||||
super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
|
ret = super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
|
print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
|
||||||
self.inference_method.on_optimization_end()
|
self.inference_method.on_optimization_end()
|
||||||
raise
|
raise
|
||||||
|
return ret
|
||||||
|
|
||||||
def infer_newX(self, Y_new, optimize=True):
|
def infer_newX(self, Y_new, optimize=True):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue