packages/text_generation_server/utils/memory_characterizer.py:71: RuntimeWarning: invalid value encountered in scalar divide
Shard 0: return (np.sqrt(c0**2 + 4*c1*(mem/batch)) - c0)/(2*c1)
Modifications
When the memory characterizer doesn't find a linear or quadratic
behavior, the coefficients are set to zero resulting in division by zero
errors in the inverse functions.
In this commit this situation is detected and the max float is returned
to be consistent with the semantics of the memory estimator
Motivation
Fixes this warning:
Modifications
When the memory characterizer doesn't find a linear or quadratic behavior, the coefficients are set to zero resulting in division by zero errors in the inverse functions.
In this commit this situation is detected and the max float is returned to be consistent with the semantics of the memory estimator