Skip to content
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

random seed #256

Open
Lili-Cao opened this issue May 11, 2024 · 9 comments
Open

random seed #256

Lili-Cao opened this issue May 11, 2024 · 9 comments

Comments

@Lili-Cao
Copy link

Issue summary

Hi,

I am wondering why the gnina results are different when I use the same parameters and run many replicas.
I didn't set a value to the random seed. (I assued it there is a default one? some place says it's 42)

Therefore I am wondering, if I don't set the random seed parameter, does gnina always using a default seed?
If so, why is the result not reproducible and the performance differ a lot?

Thanks!
Lili

Steps to reproduce

Your system configuration

Operating system: Linux
Compiler:
CUDA version (if applicable):
CUDNN version (if applicable):
Python version:

@dkoes
Copy link
Contributor

dkoes commented May 11, 2024

No, it does not use a default value for the seed. In fact, you should see it print out the value of the random seed it is using and it will be different for each run unless you explicitly set it.

@Lili-Cao
Copy link
Author

thanks for your prompt reply!
Aha, that's the reason.

Due to the way I integrated Gnina and the way of logging results, I can't see the output info generated while Gnina running.
Could you please tell me which numbers Gnina would use for a random seed?
So I can run Gnina with all the seeds and try to reproduce my results?

Thanks!

@dkoes
Copy link
Contributor

dkoes commented May 11, 2024

If you don't set the seed then it is the id of the process times the current time (modulo 32 bits). So you really have no hope of guessing what seed was used in a run unless you saved the output or explicitly set the seed.

@Lili-Cao
Copy link
Author

: (
Em... OK, seems I have to set it explicitly then. Thank you!

@Lili-Cao
Copy link
Author

Let's say if I run gnina with exhaustiveness = 8 and poses = 8, but with 4 different seeds, and take the best prediction.
and run exhaustiveness =64 and poses = 8, only one seed.
Which one do you think would possibly give better prediction?

@dkoes
Copy link
Contributor

dkoes commented May 11, 2024

4*8 = 32 < 64 so the later since you are doing twice as much sampling. If you do the same amount of sampling the results should be the same in expectation.

@Lili-Cao
Copy link
Author

So, if I do 8 random seed, 8*8=64, and hope the 64 random search are exactly the same as the random search for exhaustiveness = 64, then the result should be the same in principle.
But in reality, when I set the exhaustiveness = 64, the seed of this calculation would affect the result, does this correct?

@Lili-Cao
Copy link
Author

The reason I am interested in this is that, I have tried different options for exhaustiveness and poses.
And I found exhaustiveness = 8 and poses = 16 have better predictions than exhaustiveness =64 and poses = 8 exhaustiveness =64 and poses = 16

@dkoes
Copy link
Contributor

dkoes commented May 11, 2024

They won't be exactly the same because the random number sequence will be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants