Skip to content

Conversation

@mhovd
Copy link
Collaborator

@mhovd mhovd commented Sep 30, 2025

Attempts to make the API a little more intuitive, and adding documentation to the trait.

Copilot AI review requested due to automatic review settings September 30, 2025 19:20
Copy link
Contributor

Copilot AI left a 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 refactors the algorithm trait to make the API more intuitive by renaming methods to be more consistent and adding comprehensive documentation. It also simplifies the algorithm execution flow by replacing manual cycle iteration with a dedicated fit() method.

  • Renamed module from evaluation to estimation and updated corresponding method names
  • Added extensive documentation to the Algorithms trait methods
  • Simplified the execution flow by consolidating the fit logic into a single method

Reviewed Changes

Copilot reviewed 10 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/routines/mod.rs Updated module name from evaluation to estimation
src/algorithms/postprob.rs Updated imports and method names, simplified convergence handling
src/algorithms/npod.rs Updated imports and method names, removed converged field
src/algorithms/npag.rs Updated imports and method names, removed converged field, improved error messages
src/algorithms/mod.rs Major trait refactoring with documentation and simplified execution flow
examples/*.rs Simplified example usage by replacing manual cycle iteration with fit() method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2025

🐰 Bencher Report

Branchrefactor-algorithm-trait
Testbedrust-loki
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
bimodal_ke_npag📈 view plot
🚷 view threshold
35.06 s
(+2.60%)Baseline: 34.17 s
35.65 s
(98.34%)
bimodal_ke_npod📈 view plot
🚷 view threshold
44.32 s
(+0.11%)Baseline: 44.27 s
44.78 s
(98.98%)
bimodal_ke_postprob📈 view plot
🚷 view threshold
15.39 s
(+0.22%)Baseline: 15.36 s
15.61 s
(98.56%)
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd requested a review from Siel October 12, 2025 12:00
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🐰 Bencher Report

Branchrefactor-algorithm-trait
Testbedrust-moan
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
bimodal_ke_npag📈 view plot
🚷 view threshold
25.32 s
(-0.51%)Baseline: 25.45 s
26.30 s
(96.28%)
bimodal_ke_npod📈 view plot
🚷 view threshold
10.43 s
(-0.73%)Baseline: 10.50 s
10.78 s
(96.72%)
bimodal_ke_postprob📈 view plot
🚷 view threshold
3.47 s
(-0.35%)Baseline: 3.48 s
3.56 s
(97.41%)
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd merged commit 488a120 into main Nov 4, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Nov 4, 2025
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.

3 participants