<p>I'm not 100% sure I understand your question, but the basinhopping parameter <code>callback</code> sounds like what you're looking for.</p>

<p>On a side note, what you're trying to do sounds a bit similar in concept to this paper <a href="http://arxiv.org/abs/1406.3896" rel="nofollow">Freeze-Thaw Bayesian Optimization</a></p>
Scipy: Convergence Metrics
<p>I'm using scipy's <a href="http://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.optimize.basinhopping.html#scipy.optimize.basinhopping" rel="nofollow">Basin Hopping algorithm</a> to optimize a multivariate cost function. Temperature is one of the parameters that greatly affects convergence time of the basin hopping algorithm. I would like to be able to determine how quickly <code>basinhopping()</code> is converging by fitting the cost function value curve up to the current iteration and determining if it's a faster convergence than the previous temperature setting.</p>

<p>Here's what the basin hopping call looks like:</p>

<pre><code>res = basinhopping(cost, guess, niter=1, T=t, minimizer_kwargs={"method": "cobyla"})
</code></pre>

<p>Is there some way to get "live" updates on the current value of the cost function so that I can do an adaptive optimization?</p>