chore: Bump pharmsol to 0.24#251
Merged
Merged
Conversation
Collaborator
Author
|
TODO: Provide wrappers to interact with the cache in |
Contributor
There was a problem hiding this comment.
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:
pharmsolto0.23.0andndarrayto0.17.2. - Replace
ErrorModels/ErrorModelwithAssayErrorModels/AssayErrorModelacross routines and algorithms. - Remove
faer-ext-based ndarray conversions and compute Psi/Theta/W transformations using directfaerindexing 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.
| error_models: &ErrorModels, | ||
| error_models: &AssayErrorModels, | ||
| progress: bool, | ||
| cache: bool, |
Comment on lines
239
to
242
| // Check dimensions | ||
| assert_eq!(psi.nspp(), 2); | ||
| assert_eq!(psi.nsub(), 3); | ||
|
|
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() { |
Contributor
|
| Branch | pharmsol-023 |
| Testbed | mhovd-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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| bimodal_ke_npag | 📈 view plot | 5,133.20 ms |
| bimodal_ke_npod | 📈 view plot | 1,470.90 ms |
| bimodal_ke_postprob | 📈 view plot | 271.10 ms |
Siel
approved these changes
Mar 24, 2026
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.