You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some trouble using pyevolve's multiprocessing. Specifically, I have issue with threads. This is the error that I get :
...
File "build/bdist.linux-x86_64/egg/pyevolve/GSimpleGA.py", line 824, in evolve
File "build/bdist.linux-x86_64/egg/pyevolve/GSimpleGA.py", line 668, in step
File "build/bdist.linux-x86_64/egg/pyevolve/GPopulation.py", line 365, in evaluate
File "/usr/lib64/python2.7/multiprocessing/init.py", line 232, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild)
File "/usr/lib64/python2.7/multiprocessing/pool.py", line 184, in init
self._result_handler.start()
File "/usr/lib64/python2.7/threading.py", line 746, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
I don't think that my code is involved in this error, but just in case :
eval func =>
def eval_gen(seq):
len_seq = len(seq)
j = 0
state = [0,0,0,0]
pmin = float("+inf")
while j < len_seq and not(is_terminal(state)) :
a = 5 if seq[j] == 0 else -5
state = compute_next_state(a,state)
cost = d(state)
if cost <= pmin:
pmin = cost
j += 1
return pmin + j
Hi,
I have some trouble using pyevolve's multiprocessing. Specifically, I have issue with threads. This is the error that I get :
...
File "build/bdist.linux-x86_64/egg/pyevolve/GSimpleGA.py", line 824, in evolve
File "build/bdist.linux-x86_64/egg/pyevolve/GSimpleGA.py", line 668, in step
File "build/bdist.linux-x86_64/egg/pyevolve/GPopulation.py", line 365, in evaluate
File "/usr/lib64/python2.7/multiprocessing/init.py", line 232, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild)
File "/usr/lib64/python2.7/multiprocessing/pool.py", line 184, in init
self._result_handler.start()
File "/usr/lib64/python2.7/threading.py", line 746, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
I don't think that my code is involved in this error, but just in case :
eval func =>
def eval_gen(seq):
GA =>
ga = GSimpleGA.GSimpleGA(genome,interactiveMode=False)
ga.setGenerations(50)
ga.setMinimax(Consts.minimaxType["minimize"])
ga.setCrossoverRate(0.5)
ga.setMutationRate(0.1)
ga.setPopulationSize(20)
ga.setMultiProcessing(True)
genome.evaluator.set(eval_gen)
ga.evolve()
seq = ga.bestIndividual()
Thanks for you help!
The text was updated successfully, but these errors were encountered: