On Hyper-parameter Tuning for Stochastic Optimization Algorithms