feat: Use pharmsol 0.25#268
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_cacheand 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.cachewhile keeping#[serde(deny_unknown_fields)]makes previously serialized settings (e.g.,settings.json) that still contain acachefield fail to deserialize. If backward compatibility matters, consider keeping a deprecatedcachefield (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.
Contributor
|
| Branch | pharmsol-0.25 |
| Testbed | mhovd-pgx |
Click to view all benchmark results
| Benchmark | Latency | Benchmark 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%) |
Siel
approved these changes
Apr 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.