emews / mela

EMEWS Model Exploration Library Archive
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

DEAP error #8

Open j-woz opened 5 years ago

j-woz commented 5 years ago

Just tried to run mela/deap and get

GET
gen     nevals  avg     std     min             max    
0       6       4.56224 3.16836 -2.20061        7.45177
EXCEPTION: Traceback (most recent call last):
  File "/home/wozniak/proj/mela/deap/ext/EQ-Py/eqpy.py", line 39, in run
    self.runnable.run()
  File "/home/wozniak/proj/mela/deap/python/algorithm.py", line 118, in run
    stats=stats, halloffame=hof, verbose=True)
  File "/usb1/wozniak/Public/sfw/anaconda3/lib/python3.6/site-packages/deap/algorithms.py", line 165, in eaSimple
    offspring = toolbox.select(population, len(population))
  File "/usb1/wozniak/Public/sfw/anaconda3/lib/python3.6/site-packages/deap/tools/selection.py", line 67, in selTournament
    aspirants = selRandom(individuals, tournsize)
  File "/usb1/wozniak/Public/sfw/anaconda3/lib/python3.6/site-packages/deap/tools/selection.py", line 24, in selRandom
    return [random.choice(individuals) for i in range(k)]
TypeError: 'float' object cannot be interpreted as an integer

I think DEAP changed or broke.

j-woz commented 5 years ago

CC @tongshu83

ncollier commented 5 years ago

I think I saw something like this recently with the deap I'm using for a different project. I'll try to take a look at the mela deap code as soon as I can.