def sweep_parameters_script(self, script_config, cv_setting_file, params_setting_file):
    script_command = script_config['ScriptCommand']
    script = os.path.join(self.work_directory, script_config['Script'])
    task_list = []
    parameter_sets = {}
    count = 0
    for f in self.feature_list:
        for p in self.parameter_combinations:
            count += 1
            task = ' '.join([script_command, script, '-d', self.data_full_path, '-p', params_setting_file, '-c', cv_setting_file, '-s', str(count)])
            task_list.append(task)
            parameter_dict = {}
            for (n, v) in zip(self.parameter_name_list, p):
                parameter_dict[n] = v
            parameter_sets[count] = {'feature_set': f, 'features': self.feature_list[f], 'parameters': parameter_dict}
    with open(params_setting_file, 'w') as fp:
        json.dump(parameter_sets, fp, indent=True)
    processes = []
    for t in task_list:
        process = subprocess.Popen(t, shell=True)
        processes.append(process)
    output = [p.wait() for p in processes]
    print(output)
def sweep_parameters_script(self, script_config, cv_setting_file, params_setting_file):
    script_command = script_config['ScriptCommand']
    script = os.path.join(self.work_directory, script_config['Script'])
    task_list = []
    parameter_sets = {}
    count = 0
    for f in self.feature_list:
        for p in self.parameter_combinations:
            count += 1
            task = ' '.join([script_command, script, '-d', self.data_full_path, '-p', params_setting_file, '-c', cv_setting_file, '-s', str(count)])
            task_list.append(task)
            parameter_dict = {}
            for (n, v) in zip(self.parameter_name_list, p):
                parameter_dict[n] = v
            parameter_sets[count] = {'feature_set': f, 'features': self.feature_list[f], 'parameters': parameter_dict}
    with open(params_setting_file, 'w') as fp:
        json.dump(parameter_sets, fp, indent=True)
    processes = []
    for t in task_list:
        process = subprocess.Popen(t, shell=True)
        processes.append(process)
    output = [p.wait() for p in processes]
    print(output)