Skip to content

feat: Use pharmsol 0.25#268

Merged
mhovd merged 5 commits into
mainfrom
pharmsol-0.25
Apr 10, 2026
Merged

feat: Use pharmsol 0.25#268
mhovd merged 5 commits into
mainfrom
pharmsol-0.25

Conversation

@mhovd
Copy link
Copy Markdown
Collaborator

@mhovd mhovd commented Apr 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 17:39
@mhovd mhovd marked this pull request as draft April 9, 2026 17:40
Copy link
Copy Markdown
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 updates PMcore to use pharmsol 0.25 and adapts the codebase to the upstream caching API changes by removing PMcore’s Settings-level cache configuration and enabling default equation caching at equation construction sites.

Changes:

  • Bump dependency to pharmsol = "=0.25".
  • Remove Config.cache / Settings::set_cache and update tests/examples accordingly.
  • Adjust debug logging to materialize prediction states via to_vec().

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Cargo.toml Updates pharmsol version requirement to 0.25.
src/routines/settings.rs Removes cache configuration from Settings/Config and updates defaults/tests accordingly.
src/algorithms/mod.rs Changes prediction state capture from cloning a reference to allocating an owned Vec.
tests/settings_tests.rs Removes assertions related to the removed cache setting.
tests/onecomp.rs Enables default equation caching via .with_default_cache().
tests/bestdose_tests.rs Enables default equation caching via .with_default_cache() across multiple tests.
examples/* Updates examples to use .with_default_cache() and removes settings.set_cache(...) calls.
Comments suppressed due to low confidence (1)

src/routines/settings.rs:151

  • Removing Config.cache while keeping #[serde(deny_unknown_fields)] makes previously serialized settings (e.g., settings.json) that still contain a cache field fail to deserialize. If backward compatibility matters, consider keeping a deprecated cache field (e.g., Option<bool> with #[serde(default)]/#[serde(skip_serializing)]) or otherwise allowing/handling the legacy field during deserialization.
/// General configuration settings
#[derive(Debug, Deserialize, Clone, Serialize)]
#[serde(deny_unknown_fields, default)]
pub struct Config {
    /// Maximum number of cycles to run
    pub cycles: usize,
    /// Denotes the algorithm to use
    pub algorithm: Algorithm,
    /// Should a progress bar be displayed for the first cycle
    ///
    /// The progress bar is not written to logs, but is written to stdout. It incurs a minor performance penalty.
    pub progress: bool,
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml
@mhovd mhovd marked this pull request as ready for review April 9, 2026 17:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

🐰 Bencher Report

Branchpharmsol-0.25
Testbedmhovd-pgx
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
bimodal_ke_npag📈 view plot
🚷 view threshold
4,957.70 ms
(+1.16%)Baseline: 4,900.86 ms
5,048.30 ms
(98.21%)
bimodal_ke_npod📈 view plot
🚷 view threshold
1,259.60 ms
(-11.35%)Baseline: 1,420.84 ms
1,614.39 ms
(78.02%)
bimodal_ke_postprob📈 view plot
🚷 view threshold
58.84 ms
(-85.37%)Baseline: 402.20 ms
588.37 ms
(10.00%)
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd merged commit 648a66e into main Apr 10, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 10, 2026
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