Closed dotcom closed 5 years ago
Your evaluation function depends on a global variable train that is randomly generated. This cannot work in multiprocessing as each process will have a different train object.
Are different objects but different values?
It is randomly generated only once.
Its really...
pid, and data
17576 : [[56.37660726530297, 57.21448899086297, ...
14992 : [[10.732069581858903, 27.533883587933413,...
Are you on Windows or Unix? On Windows It should be generated twice
It is Windows. When I tried it on Ubuntu now, there was no problem. wow why? What kind of mechanism is it? If you know, please tell me briefly. Isn't Copy on write in windows?
Unix fork the process and copy the memory. Windows starts k processes, thus the script is entirely run in each process.
You can find more information in the multiprocessing module documentation.
Le sam. 18 mai 2019 09 h 15, dotcom notifications@github.com a écrit :
It is Windows. When I tried it on Ubuntu now, there was no problem. wow why? What kind of mechanism is it? If you know, please tell me briefly. Isn't Copy on write in windows?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/DEAP/deap/issues/355?email_source=notifications&email_token=AAHKXQSVC6KNOBH7VUPXXS3PV76PVA5CNFSM4HN2HBE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWOOZY#issuecomment-493676391, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHKXQTLJTT7BBPIWXPZJODPV76PVANCNFSM4HN2HBEQ .
Thank you for your kindness.
In the evaluation, I tried to output the evaluation value and the individual at that time.
This was the one with the highest rating.
However, when I evaluated best (hof) again after completion, different value cames out. (The gene is the same)
turn off multiprocessing
Several studies have shown that multiprocessing is affecting me. As a result, when I stopped multiprocessing, this was output correctly.
why? Thank you.