There are off-the-shelf libraries like BayesianOptimization, optuna, hyperopt , etc but they are not really compatible with pyspark(to be specific mmlspark)