def runBaseDescriptionAndPermutations(self, expDesc, hsVersion, maxModels=<NUM_LIT:2>):
<EOL>self.getModules(expDesc, hsVersion=hsVersion)<EOL>permutationsPyPath = os.path.join(g_myEnv.testOutDir, "<STR_LIT>")<EOL>args = [g_myEnv.testOutDir]<EOL>from nupic.frameworks.opf.experiment_runner import runExperiment<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>runExperiment(args)<EOL>jobParams = {'<STR_LIT>' : generatePersistentJobGUID(),<EOL>'<STR_LIT>': permutationsPyPath,<EOL>'<STR_LIT>': hsVersion,<EOL>}<EOL>if maxModels is not None:<EOL><INDENT>jobParams['<STR_LIT>'] = maxModels<EOL><DEDENT>args = ['<STR_LIT>', '<STR_LIT>' % (json.dumps(jobParams))]<EOL>self.resetExtraLogItems()<EOL>self.addExtraLogItem({'<STR_LIT>':jobParams})<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>LOGGER.info("<STR_LIT>")<EOL>jobID = hypersearch_worker.main(args)<EOL>cjDAO = ClientJobsDAO.get()<EOL>models = cjDAO.modelsGetUpdateCounters(jobID)<EOL>modelIDs = [model.modelId for model in models]<EOL>results = cjDAO.modelsGetResultAndStatus(modelIDs)<EOL>if maxModels is not None:<EOL><INDENT>self.assertEqual(len(results), maxModels, "<STR_LIT>"<EOL>"<STR_LIT>" % (maxModels, len(results)))<EOL><DEDENT>for result in results:<EOL><INDENT>self.assertEqual(result.completionReason, cjDAO.CMPL_REASON_EOF,<EOL>"<STR_LIT>" % (result.completionMsg))<EOL><DEDENT>return results<EOL>
This does the following:

        1.) Calls ExpGenerator to generate a base description file and permutations
        file from expDescription.

        2.) Verifies that description.py and permutations.py are valid python
        modules that can be loaded

        3.) Runs the base description.py as an experiment using OPF RunExperiment.

        4.) Runs a Hypersearch using the generated permutations.py by passing it
        to HypersearchWorker.

        Parameters:
        -------------------------------------------------------------------
        expDesc:       JSON format experiment description
        hsVersion:     which version of hypersearch to use ('v2'; 'v1' was dropped)
        retval:        list of model results