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

Optional random seed as user input #179

Merged
merged 9 commits into from
Apr 4, 2024
Merged

Optional random seed as user input #179

merged 9 commits into from
Apr 4, 2024

Conversation

HenningSE
Copy link
Collaborator

With this PR we will give users the option to set the random seed manually. If you want to use this function, you need to set deterministic_seed to False and user_defined_random_seed to the seed you want to use.

@coveralls
Copy link

coveralls commented Mar 25, 2024

Pull Request Test Coverage Report for Build 8555588004

Details

  • 11 of 13 (84.62%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 68.484%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugin.py 9 11 81.82%
Totals Coverage Status
Change from base Build 8539752086: 0.2%
Covered Lines: 1834
Relevant Lines: 2678

💛 - Coveralls

@HenningSE HenningSE marked this pull request as ready for review March 25, 2024 12:29
@HenningSE HenningSE requested a review from ramirezdiego March 25, 2024 12:30
@HenningSE HenningSE linked an issue Mar 25, 2024 that may be closed by this pull request
Copy link
Contributor

@dachengx dachengx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HenningSE . Please add a test for this feature.

@HenningSE
Copy link
Collaborator Author

Thanks for the suggestion @dachengx. I added the following tests:

  • test if all fuse plugins get the user defined seed
  • test if all fuse plugins with a rng have a seed value defined
  • test if we can intercept negative random seeds
  • test if the run number changes the deterministic random seed
  • test if a changed config arg changes the deterministic random seed

The last two tests are not specific to the changes in this PR but I think it does not hurt us to have them.

@HenningSE HenningSE requested a review from dachengx April 4, 2024 13:14
Copy link
Contributor

@dachengx dachengx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HenningSE . All good with a small potential improvement.

@dachengx dachengx merged commit 2fb9844 into main Apr 4, 2024
4 checks passed
@dachengx dachengx deleted the random_seed_from_user branch April 4, 2024 13:48
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.

User defined random seed
3 participants