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
When using multiprocessing, something goes wrong. #355
Comments
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
|
Are you on Windows or Unix? On Windows It should be generated twice |
It is 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
<#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.
The text was updated successfully, but these errors were encountered: