-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory issues #5
Comments
Hello, I have also experienced the same issue, and can't run my experiments I tough it was a problem with garbage collection. I think one can have this as a parameter. num_generations_history Cheers, 2016-02-11 16:08 GMT+01:00 guyko81 notifications@github.com:
/ .- .-.. .-.. / -.-- --- ..- / -. . . -.. / .. ... / .-.. --- ...- . |
Thanks for the report! I'll look into your hypothesis @guyko81 but suspect the issue is more likely with numpy arrays being stored as the equations are recursively evaluated. These /should/ be garbage collected by Python as they are never stored in the object, but I'll check that out as well @jamartinh I have seen this issue as well, and was thinking that a For now, you might find using |
Thanks Trevor! Can't tell more, so thank you :) |
I've located the main culprit. It is due almost entirely to saving the indices of X & y used for evaluating a programs fitness in the case of using |
I have also added a check at each evolution to see whether older generations are still relevant, ie whether any of their "dna" exists in the current generation. Any irrelevant programs will be removed from the old generation's population by marking them as |
Mostly fixed by #19 ... Please re-open if problems still persist in the master branch or the next release. |
Hi Trevor,
it's a very nice implementation - I was searching for such solution for a long time. So really thank you!
I got only 1 issue that with long term of evolution (generations = some_huge_number; or population_size = some_huge_number + generations = some_number) the program runs out of memory. I checked the code and it saves every iteration's population. Do you think it's necessary? In my understanding we only need the current population and the best of the previous in the beginning.
What do you think, can the code be changed some way to make
self._programs = []
before every iteration and just save the previous one in a self._programs_prev (or something)?
The text was updated successfully, but these errors were encountered: