def execute(tensor, para): # loop over each density and each round if para['parallelMode']: # run on multiple processes pool = multiprocessing.Pool() for den in para['density']: for roundId in xrange(para['rounds']): pool.apply_async(executeOneSetting, (tensor, den, roundId, para)) pool.close() pool.join() else: # run on single processes for den in para['density']: for roundId in xrange(para['rounds']): executeOneSetting(tensor, den, roundId, para) # summarize the dumped results evallib.summarizeResult(para, tensor.shape[2])
def execute(tensor, para): # loop over each density and each round if para['parallelMode']: # run on multiple processes pool = multiprocessing.Pool() for den in para['density']: for roundId in xrange(para['rounds']): pool.apply_async(executeOneSetting, (tensor, den, roundId, para)) pool.close() pool.join() else: # run on single processes for den in para['density']: for roundId in xrange(para['rounds']): executeOneSetting(tensor, den, roundId, para) # summarize the dumped results evallib.summarizeResult(para, tensor.shape[2])