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

Option to specify random seed #237

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Option to specify random seed #237

merged 2 commits into from
Mar 26, 2024

Conversation

cgohil8
Copy link
Collaborator

@cgohil8 cgohil8 commented Mar 26, 2024

Changes:

  • Removed random_seed argument from simulation classes.
  • Added utility function osl_dynamics.utils.misc.set_random_seed (can be imported from osl_dynamics.utils) to set the python, numpy and tensorflow random seeds.

The following code can be added to the top of a script to make it completely deterministic:

from osl_dynamics.utils import set_random_seed

set_random_seed(0)

@cgohil8 cgohil8 merged commit a8ed6ae into main Mar 26, 2024
1 check passed
@cgohil8 cgohil8 deleted the random_seed branch March 26, 2024 20:14
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

Successfully merging this pull request may close these issues.

None yet

1 participant