h2o-py/h2o/utils/progressbar.py
def _get_time_at_progress(self, x_target):
        """
        Return the projected time when progress level `x_target` will be reached.

        Since the underlying progress model is nonlinear, we need to do use Newton method to find a numerical solution
        to the equation x(t) = x_target.
        """
        t, x, v = self._t0, self._x0, self._v0
        # The convergence should be achieved in just few iterations, however in unlikely situation that it doesn't
        # we don't want to loop forever...
        for _ in range(20):
            if v == 0: return 1e20
            # make time prediction assuming the progress will continue at a linear speed ``v``
            t += (x_target - x) / v
            # calculate the actual progress at that time
            x, v = self._compute_progress_at_time(t)
            # iterate until convergence
            if abs(x - x_target) < 1e-3: return t
        return time.time() + 100
def _get_time_at_progress(self, x_target):
        t, x, v = self._t0, self._x0, self._v0
        # The convergence should be achieved in just few iterations, however in unlikely situation that it doesn't
        # we don't want to loop forever...
        for _ in range(20):
            if v == 0: return 1e20
            # make time prediction assuming the progress will continue at a linear speed ``v``
            t += (x_target - x) / v
            # calculate the actual progress at that time
            x, v = self._compute_progress_at_time(t)
            # iterate until convergence
            if abs(x - x_target) < 1e-3: return t
        return time.time() + 100
def _get_time_at_progress ( self , x_target ) : t , x , v = self . _t0 , self . _x0 , self . _v0 # The convergence should be achieved in just few iterations, however in unlikely situation that it doesn't # we don't want to loop forever... for _ in range ( 20 ) : if v == 0 : return 1e20 # make time prediction assuming the progress will continue at a linear speed ``v`` t += ( x_target - x ) / v # calculate the actual progress at that time x , v = self . _compute_progress_at_time ( t ) # iterate until convergence if abs ( x - x_target ) < 1e-3 : return t return time . time ( ) + 100
Return the projected time when progress level `x_target` will be reached.

        Since the underlying progress model is nonlinear, we need to do use Newton method to find a numerical solution
        to the equation x(t) = x_target.
Return the projected time when progress level x_target will be reached .