public JobTuningInfo generateParamSet(JobTuningInfo jobTuningInfo) {
    logger.info("Generating param set for job: " + jobTuningInfo.getTuningJob().jobName);

    JobTuningInfo newJobTuningInfo = new JobTuningInfo();
    newJobTuningInfo.setTuningJob(jobTuningInfo.getTuningJob());
    newJobTuningInfo.setParametersToTune(jobTuningInfo.getParametersToTune());
    newJobTuningInfo.setJobType(jobTuningInfo.getJobType());

    JsonNode jsonJobTuningInfo = Json.toJson(jobTuningInfo);
    String parametersToTune = jsonJobTuningInfo.get(PARAMS_TO_TUNE_FIELD_NAME).toString();
    String stringTunerState = jobTuningInfo.getTunerState();
    stringTunerState = stringTunerState.replaceAll("\\s+", "");
    String jobType = jobTuningInfo.getJobType().toString();

    List<String> error = new ArrayList<String>();

    try {
      Process p = Runtime.getRuntime()
          .exec(
              PYTHON_PATH + " " + TUNING_SCRIPT_PATH + " " + stringTunerState + " " + parametersToTune + " " + jobType);
      BufferedReader inputStream = new BufferedReader(
          new InputStreamReader(p.getInputStream(), Charset.forName("UTF-8")));
      BufferedReader errorStream = new BufferedReader(
          new InputStreamReader(p.getErrorStream(), Charset.forName("UTF-8")));
      String updatedStringTunerState = inputStream.readLine();
      newJobTuningInfo.setTunerState(updatedStringTunerState);
      String errorLine;
      while ((errorLine = errorStream.readLine()) != null) {
        error.add(errorLine);
      }
      if (error.size() != 0) {
        logger.error("Error in python script running PSO: " + error.toString());
      }
    } catch (IOException e) {
      logger.error("Error in generateParamSet()", e);
    }
    return newJobTuningInfo;
  }
Interacts with python scripts to generate new parameter suggestions
@param jobTuningInfo Job tuning information
@return Updated job tuning information
app/com/linkedin/drelephant/tuning/PSOParamGenerator.java