-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Add validation of parameters #136
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
Conversation
Ensures that the parameter ranges are valid prior to initialization
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.
Pull Request Overview
This PR adds validation for parameter bounds before sampling and renames accessor methods in the Prior
enum.
- Renamed
get_points
→points
andget_seed
→seed
, with updated doc comments - Added a loop in
sample_space
to validate that each parameter’s bounds are finite, properly ordered, and non-zero
Comments suppressed due to low confidence (1)
src/routines/initialization/mod.rs:68
- These new validation branches lack unit tests. Consider adding tests that exercise infinite bounds, reversed bounds, and zero‐range parameters to ensure each bail condition behaves as expected.
for param in settings.parameters().iter() {
|
Branch | parameter-validation |
Testbed | orion |
Click to view all benchmark results
Benchmark | Latency | Benchmark Result seconds (s) (Result Δ%) | Upper Boundary seconds (s) (Limit %) |
---|---|---|---|
bimodal_ke_fit | 📈 view plot 🚷 view threshold | 9.71 s(-40.47%)Baseline: 16.31 s | 26.62 s (36.46%) |
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds validation to ensure that parameter ranges are valid prior to initialization, preventing infinite bounds and invalid orderings. In addition, the PR refactors getter method names from get_points/get_seed to more idiomatic points/seed, while incorporating inline documentation for clarity.
Comments suppressed due to low confidence (1)
src/routines/initialization/mod.rs:68
- Consider adding unit tests for the new parameter validation logic to ensure that the bail! calls are triggered as expected for infinite bounds and invalid ranges.
for param in settings.parameters().iter() {
Ensures that the parameter ranges are valid prior to initialization