Skip to content

Update code-review: pre-JOSS fixes (9daf77f)#19

Merged
danielchen26 merged 1 commit into
Merck:code-reviewfrom
danielchen26:code-review
Jun 4, 2026
Merged

Update code-review: pre-JOSS fixes (9daf77f)#19
danielchen26 merged 1 commit into
Merck:code-reviewfrom
danielchen26:code-review

Conversation

@danielchen26

@danielchen26 danielchen26 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pushes the latest local code-review work to update Merck's code-review branch.

Commit: 9daf77f — Fix correctness, reproducibility, and API issues from pre-JOSS review

Fork is 1 commit ahead of Merck/code-review (compare: code-review...danielchen26:code-review).

Note

Direct push to Merck/CEEDesigns.jl is not permitted for this account (push: false). Please merge this PR to land changes on code-review.

Correctness & crashes:
- S1: DiscreteDistance was inverted (match -> large distance). Now
  `y == x ? 0.0 : λ`, consistent with QuadraticDistance, so rows matching
  the evidence receive the highest similarity weight.
- C1: ConditionalUncertaintyReductionMDP normalizes target_condition keys to
  String (Symbol keys constructed fine but crashed at runtime) and validates
  ranges; conditional_likelihood is now robust to String/Symbol keys.
- C2: accept Union{Missing,<:Real} constraint columns (nonmissingtype check)
  and exclude missing rows via coalesce(..., false).
- M1: max_experiments now counts completed experiments, not raw evidence
  entries, so prior evidence / multi-feature experiments are not mis-counted.
- M4: QuadraticDistance raises a clear ArgumentError on a zero-variance
  (constant) column and recomputes σ per call (drops cross-column memoization).
- N3: DistanceBased validates importance_weights vector length.

Reproducibility & concurrency:
- S2: default_solver(rng) is seedable; each Sim runoff gets an independent rng
  (fixes a parallel data race); efficient_designs / conditional_efficient_designs
  use a fresh solver+rng per threshold; perform_ensemble_designs uses an
  independent rng per ensemble run.
- S3: optimal_arrangement takes an rng (no implicit GLOBAL_RNG); static
  efficient_designs pre-seeds one rng per task before @threads.

Docs / robustness / naming:
- C3: public-input @Assert -> ArgumentError across MDP constructors,
  conditional_likelihood, and Entropy.
- D1: EfficientValueMDP docstring value signature -> value(evidence, costs).
- D2: Exponential docstring (λ=1/2, exp(-λx)); typos; unified terminal_condition
  default; tau_set alias (thred_set still accepted).
- D3: static evaluate_experiments normalizes Symbol features; plot_front empty
  guard and get_labels -> make_labels docstring fix; ensemble column
  Average_Utility -> Average_Cost.
- M2: ensemble_to_dataframe de-duplicates identical points within a run so
  realized_uncertainty collapses no longer inflate MLASP frequencies.
- P1/P2: documented normalized uncertainty and hard terminal condition.

Also adds CHANGELOG.md summarizing these changes, regression tests
(test_review_fixes.jl, ensemble M2 dedupe, static S3 reproducibility), and
.gitignore entries for local workspace/tooling artifacts. Full suite green
with JULIA_NUM_THREADS=4.
@danielchen26 danielchen26 merged commit 1bfe096 into Merck:code-review Jun 4, 2026
4 checks passed
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.

1 participant