def run_trial(self, trial_num, param):
'''
algo step 2, construct and run Trial with the next param
args trial_num, param must be provided externally,
otherwise they will not progress within mp.process
'''
experiment_spec = self.compose_experiment_spec(param)
trial = self.Trial(
experiment_spec, trial_num=trial_num,
times=self.times,
num_of_trials=self.num_of_trials,
run_timestamp=self.run_timestamp,
experiment_id_override=self.experiment_id_override)
trial_data = trial.run()
del trial
import gc
gc.collect()
debug_mem_usage()
return trial_data
# retrieve the trial_num, param, fitness_score from trial_data
评论列表
文章目录