Using multiprocessing in DEAP for genetic programming
问题 I'm using DEAP library to implement genetic programming and I have used eaMuCommaLambda algorithm for this purpose. In order to run the program in parallel, I followed the instructions in the DEAP document and added the two following lines of code in the if __name__ == "__main__" section. import multiprocessing pool = multiprocessing.Pool() toolbox.register("map", pool.map) pop, log = algorithms.eaMuCommaLambda(pop, toolbox, MU, LAMBDA, cxpb, mutpb, gen, halloffame=hof, stats=mstats, verbose