コード例 #1
0
                              for j in range(segments)
                              ]  # segmentsXsegments identity matrix

# Optional definitions for pbsGridWalker that depend on the number of segments
pointsPerJob = 10
queue = 'workq'
expectedWallClockTime = '30:00:00'

# Optional definitions for pbsGridWalker that are constant
maxJobs = 25
involvedGitRepositories = mmr.involvedGitRepositories

# Required pbsGridWalker definitions
parametricGrid = gr.Grid1d(
    'sensorAttachmentType', attachments.keys()) * gr.Grid1d(
        'initialPopulationType', initialPopulationTypes) * gr.Grid1dFromFile(
            'randomSeed', mmr.randSeedFile, size=numTrials)


def prepareEnvironment(experiment):
    if not exists(mmr.arrowbotsExecutable):
        raise RuntimeError('Arrowbots executable not found at ' +
                           mmr.arrowbotsExecutable)
    if not exists(mmr.evsExecutable):
        raise RuntimeError('EVS executable not found at ' + mmr.evsExecutable)


def runComputationAtPoint(worker, params):
    print('Running evs-arrowbots pair with the following parameters: ' +
          str(params))
    parsedParams = tal.classifyDict(params, classifiers.serverClientClassifier)
    serverParams = tal.sumOfDicts(parsedParams['server'], evsAdditionalParams)
コード例 #2
0
    'populationSize': 50,
    'genStopAfter': 4000,
    'initialPopulationType': 'sparse', 'secondObjectiveProbability': 1.0, 'newIndividualsPerGeneration': 1,
    'backup': 'yes', 'backupPeriod': 100, 'trackAncestry': 'no',
    'logBestIndividual': 'yes', 'logPopulation': 'no',
    'printGeneration': 'yes', 'printPopulation': 'no', 'printParetoFront': 'yes',
    'logParetoFront': 'yes', 'logParetoFrontKeepAllGenerations': 'yes', 'logParetoFrontPeriod': 10,
    'randomSeed': 42}

### Required pbsGridWalker definitions
computationName = 'temporal_pool'
nonRSGrid = gr.Grid1d(
    'initialPopulationType', ['random', 'sparse']) * gr.Grid1d(
        'newIndividualsPerGeneration', [0, 5]) * gr.Grid1d(
            'evolver', ['temporalUnrolling', 'temporalUnrollingVer0'])
parametricGrid = nonRSGrid * numTrials + gr.Grid1dFromFile(
    'randomSeed', cr.randSeedFile, size=len(nonRSGrid) * numTrials)

for par in parametricGrid.paramNames():
    evsDefaults.pop(par)


def prepareEnvironment(experiment):
    ce.prepareEnvironment(experiment)


def runComputationAtPoint(worker, params):
    return ce.runComputationAtPoint(worker,
                                    params,
                                    evsDefaults,
                                    parallelClients=cores)
コード例 #3
0
arrowbotsAdditionalParams = {'segments': segments,
                             'simulationTime': 10., 'timeStep': 0.1, 'integrateError': 'no', 'writeTrajectories': 'no'}
arrowbotInitialConditions = [[0]*segments]*segments # segmentsXsegments null matrix
arrowbotTargetOrientations = [ [1 if i==j else 0 for i in range(segments)] for j in range(segments) ] # segmentsXsegments identity matrix

# Optional definitions for pbsGridWalker that depend on the number of segments
pointsPerJob = 25
maxJobs = 8
queue = 'shortq'
expectedWallClockTime = '01:00:00'

# Optional definitions for pbsGridWalker that are constant
involvedGitRepositories = mmr.involvedGitRepositories

# Required pbsGridWalker definitions
parametricGrid = gr.Grid1d('sensorAttachmentType', attachments.keys())*gr.Grid1d('initialPopulationType', initialPopulationTypes)*gr.Grid1dFromFile('randomSeed', mmr.randSeedFile, size=numTrials)

def prepareEnvironment(experiment):
	if not exists(mmr.arrowbotsExecutable):
		raise RuntimeError('Arrowbots executable not found at ' + mmr.arrowbotsExecutable)
	if not exists(mmr.evsExecutable):
		raise RuntimeError('EVS executable not found at ' + mmr.evsExecutable)

def runComputationAtPoint(worker, params):
	print('Running evs-arrowbots pair with the following parameters: ' + str(params))
	parsedParams = tal.classifyDict(params, classifiers.serverClientClassifier)
	serverParams = tal.sumOfDicts(parsedParams['server'], evsAdditionalParams)
	clientParams = tal.sumOfDicts(parsedParams['client'], arrowbotsAdditionalParams)
	tiniw.write(serverParams, classifiers.evsClassifier, 'evs.ini')
	tiniw.write(clientParams, classifiers.arrowbotsClassifier, 'arrowbot.ini')
	tfio.writeColumns(arrowbotInitialConditions, 'initialConditions.dat')