def _runPermutationsLocal(self, jobParams, loggingLevel=logging.INFO,<EOL>env=None, waitForCompletion=True,<EOL>continueJobId=None, ignoreErrModels=False):
print()<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>if env is not None:<EOL><INDENT>saveEnvState = copy.deepcopy(os.environ)<EOL>os.environ.update(env)<EOL><DEDENT>cjDAO = ClientJobsDAO.get()<EOL>if continueJobId is None:<EOL><INDENT>jobID = cjDAO.jobInsert(client='<STR_LIT:test>', cmdLine='<STR_LIT>',<EOL>params=json.dumps(jobParams),<EOL>alreadyRunning=True, minimumWorkers=<NUM_LIT:1>, maximumWorkers=<NUM_LIT:1>,<EOL>jobType = cjDAO.JOB_TYPE_HS)<EOL><DEDENT>else:<EOL><INDENT>jobID = continueJobId<EOL><DEDENT>args = ['<STR_LIT>', '<STR_LIT>' % (jobID),<EOL>'<STR_LIT>' % (loggingLevel)]<EOL>if continueJobId is None:<EOL><INDENT>args.append('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>hypersearch_worker.main(args)<EOL><DEDENT>except SystemExit:<EOL><INDENT>pass<EOL><DEDENT>except:<EOL><INDENT>raise<EOL><DEDENT>if env is not None:<EOL><INDENT>os.environ = saveEnvState<EOL><DEDENT>models = cjDAO.modelsGetUpdateCounters(jobID)<EOL>modelIDs = [model.modelId for model in models]<EOL>if len(modelIDs) > <NUM_LIT:0>:<EOL><INDENT>results = cjDAO.modelsGetResultAndStatus(modelIDs)<EOL><DEDENT>else:<EOL><INDENT>results = []<EOL><DEDENT>metricResults = []<EOL>for result in results:<EOL><INDENT>if result.results is not None:<EOL><INDENT>metricResults.append(list(json.loads(result.results)[<NUM_LIT:1>].values())[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>metricResults.append(None)<EOL><DEDENT>if not ignoreErrModels:<EOL><INDENT>self.assertNotEqual(result.completionReason, cjDAO.CMPL_REASON_ERROR,<EOL>"<STR_LIT>" % (result.completionMsg))<EOL><DEDENT><DEDENT>jobInfo = cjDAO.jobInfo(jobID)<EOL>return (jobID, jobInfo, results, metricResults)<EOL>
This runs permutations on the given experiment using just 1 worker
        in the current process

        Parameters:
        -------------------------------------------------------------------
        jobParams:        filled in job params for a hypersearch
        loggingLevel:    logging level to use in the Hypersearch worker
        env:             if not None, this is a dict of environment variables
                            that should be sent to each worker process. These can
                            aid in re-using the same description/permutations file
                            for different tests.
        waitForCompletion: If True, wait for job to complete before returning
                           If False, then return resultsInfoForAllModels and
                           metricResults will be None
        continueJobId:    If not None, then this is the JobId of a job we want
                          to continue working on with another worker.
        ignoreErrModels:  If true, ignore erred models
        retval:          (jobId, jobInfo, resultsInfoForAllModels, metricResults)