Skip to content

chore: Bump pharmsol to 0.24#251

Merged
Siel merged 9 commits into
mainfrom
pharmsol-023
Mar 24, 2026
Merged

chore: Bump pharmsol to 0.24#251
Siel merged 9 commits into
mainfrom
pharmsol-023

Conversation

@mhovd
Copy link
Copy Markdown
Collaborator

@mhovd mhovd commented Mar 17, 2026

No description provided.

@mhovd mhovd marked this pull request as ready for review March 18, 2026 12:12
Copilot AI review requested due to automatic review settings March 18, 2026 12:12
@mhovd
Copy link
Copy Markdown
Collaborator Author

mhovd commented Mar 18, 2026

TODO: Provide wrappers to interact with the cache in pharmsol using the settings

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

Updates the codebase to work with newer pharmsol (and ndarray) APIs, primarily by migrating error-model types and replacing faer-ext ndarray conversion helpers with explicit conversions / faer-native operations.

Changes:

  • Bump dependencies: pharmsol to 0.23.0 and ndarray to 0.17.2.
  • Replace ErrorModels/ErrorModel with AssayErrorModels/AssayErrorModel across routines and algorithms.
  • Remove faer-ext-based ndarray conversions and compute Psi/Theta/W transformations using direct faer indexing and operations.

Reviewed changes

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

Show a summary per file
File Description
src/structs/psi.rs Switch Psi calculation to log_likelihood_matrix + exp, remove ndarray/faer-ext conversions, and update tests to compare via faer matrix access.
src/routines/settings.rs Migrate settings/builder/test code to AssayErrorModels and AssayErrorModel.
src/routines/output/mod.rs Replace ndarray conversion helpers with explicit Array2::from_shape_fn conversions; simplify weight extraction.
src/bestdose/posterior.rs Update function signatures to accept AssayErrorModels.
src/bestdose/mod.rs Update posterior-density helper signature to accept AssayErrorModels.
src/algorithms/postprob.rs Update stored error model type to AssayErrorModels.
src/algorithms/npod.rs Update error model types and move Psi/weight computations to faer-native operations; revise Psi validation accordingly.
src/algorithms/npag.rs Update error model types to AssayErrorModels / AssayErrorModel.
src/algorithms/mod.rs Update Psi validation to iterate faer matrices directly (no ndarray conversions).
Cargo.toml Bump ndarray and pharmsol versions.

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

Comment thread src/structs/psi.rs Outdated
error_models: &ErrorModels,
error_models: &AssayErrorModels,
progress: bool,
cache: bool,
Comment thread src/structs/psi.rs
Comment on lines 239 to 242
// Check dimensions
assert_eq!(psi.nspp(), 2);
assert_eq!(psi.nsub(), 3);

Comment thread src/algorithms/mod.rs
Comment on lines 40 to 44
// First coerce all NaN and infinite in psi to 0.0
for i in 0..psi.nrows() {
for j in 0..self.psi().matrix().ncols() {
let val = psi.get((i, j)).unwrap();
for j in 0..psi.ncols() {
let val = psi[(i, j)];
if val.is_nan() {
Comment thread Cargo.toml Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 23, 2026

🐰 Bencher Report

Branchpharmsol-023
Testbedmhovd-pgx

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
bimodal_ke_npag📈 view plot
⚠️ NO THRESHOLD
5,133.20 ms
bimodal_ke_npod📈 view plot
⚠️ NO THRESHOLD
1,470.90 ms
bimodal_ke_postprob📈 view plot
⚠️ NO THRESHOLD
271.10 ms
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd changed the title chore: Bump pharmsol chore: Bump pharmsol to 0.24 Mar 24, 2026
@Siel Siel merged commit 09ae38a into main Mar 24, 2026
6 checks passed
@Siel Siel deleted the pharmsol-023 branch March 24, 2026 21:15
@github-actions github-actions Bot mentioned this pull request Mar 24, 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