pymoo icon indicating copy to clipboard operation
pymoo copied to clipboard

Riesz s-Energy returns different outputs for same random seed

Open LucasAlegre opened this issue 1 year ago • 3 comments

If you start two different Python processes and run:

get_reference_directions("energy", 4, 32, seed=42)

I get different outputs each time. I believe there is something wrong with how the random seed is set.

LucasAlegre avatar Aug 20 '24 09:08 LucasAlegre

very interesting. I quickly looked into it and yes I can reproduce it that even though the random seed is provided the results don't match.

However, the np.random.seed(seed) method seems to be called in all runs.

Need to look a little more into this and will let you know.

blankjul avatar Aug 25 '24 21:08 blankjul

I think the commit above fixes this now. Can you please check?

blankjul avatar Aug 25 '24 21:08 blankjul

I cannot install it from source because I'm using python 3.8 and pymoo now requires python>=3.9 :/

LucasAlegre avatar Aug 26 '24 08:08 LucasAlegre

I will close this issue for now. You can use conda do update your environment if needed. Please reopen the issue if you find the current version does not resolve it.

blankjul avatar Nov 05 '24 09:11 blankjul

Do you have an estimate of when a new release will be on pypi with this fix? Thanks!

LucasAlegre avatar Nov 05 '24 12:11 LucasAlegre

I usually try to create a release 2-3 times a year. Depending on the number of commits.

Was the fix successful with the current dev version?

blankjul avatar Nov 24 '24 18:11 blankjul

When following the instructions in the README to install it from source, it installs version 0.6.0.1 and then the fix does not seem to have worked.

LucasAlegre avatar Nov 25 '24 14:11 LucasAlegre