-
Notifications
You must be signed in to change notification settings - Fork 16
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
Collate random seed setting #2978
Conversation
ddcfc03
to
f01f07e
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2978 +/- ##
===========================================
+ Coverage 79.79% 79.81% +0.01%
===========================================
Files 226 226
Lines 25044 25052 +8
===========================================
+ Hits 19985 19994 +9
+ Misses 5059 5058 -1 ☔ View full report in Codecov by Sentry. |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me thanks very much. That test isn't failing for me or the CI so maybe its something in your setup?
* 🔐 Collate random seed setting * ✅ Add random seed from RNGSeeds class to the function in collocation_points() --------- Co-authored-by: Athoy Nilima <athoy.nilima@ukaea.uk>
* 🔐 Collate random seed setting * ✅ Add random seed from RNGSeeds class to the function in collocation_points() --------- Co-authored-by: Athoy Nilima <athoy.nilima@ukaea.uk>
Linked Issues
Closes #2960
Description
Collate random seed setting: sets the random number seed so our results in some cases are reproduceable.
Added the class
RNGSeeds
inbluemira/base/constants.py
.It sets random seeds to be used in functions that depend on random number generations:
collocation_points()
inbluemira.equilibria.harmonics
,generate_lognorm_distribution()
,generate_truncnorm_distribution()
, andgenerate_exponential_distribution()
inbluemira.fuel_cycle.timeline_tools
,and
calculate_outages()
inbluemira.fuel_cycle.timeline
In case you add new functionalities in Bluemira in future that would depend on random number generations, it will be suggested to put a corresponding random seed in the
RNGSeeds
class too.Interface Changes
Checklist
I confirm that I have completed the following checks:
pytest tests --reactor
pre-commit run --from-ref develop --to-ref HEAD
sphinx-build -W documentation/source documentation/build