Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def compute_trials(self, model, data, max_evals, notebook_name):
model_string = get_hyperopt_model_string(model=model, data=data, functions=None, notebook_name=notebook_name,
verbose=False, stack=3)
hyperas_worker = HyperasWorker(model_string, max_evals)
dummy_rdd = self.spark_context.parallelize([i for i in range(1, 1000)])
dummy_rdd = dummy_rdd.repartition(self.num_workers)
trials_list = dummy_rdd.mapPartitions(
hyperas_worker._minimize).collect()
return trials_list