coin-or/rbfopt

Problem with restarting pool while running optimize_parallel

saitejag opened this issue · 1 comments

Traceback (most recent call last):
  File "test_rbfopt.py", line 9, in <module>
    m.run_rbfopt()
  File "strat_rbfopt.py", line 116, in run_rbfopt
    val, x, itercount, evalcount, fast_evalcount = alg.optimize_parallel()
  File "python-env/lib64/python3.6/site-packages/rbfopt/rbfopt_algorithm.py", line 1185, in optimize_parallel
    self.restart(pool=pool)
  File "python-env/lib64/python3.6/site-packages/rbfopt/rbfopt_algorithm.py", line 1849, in restart
    self.update_log('Initialization', self.node_is_noisy[i], val, gap)
  File "python-env/lib64/python3.6/site-packages/rbfopt/rbfopt_algorithm.py", line 484, in update_log
    ' {:8.2f}'.format(gap*100) +
AttributeError: 'RbfoptAlgorithm' object has no attribute 'start_time'

Since self.start_time isn't getting set on optimise_parallel restarting pool throws this error. I think adding self.start_time = start_time at line 1135 corrects this problem

Oh my bad I figured that I could just call optimize() instead of calling optimize_parallel()