Support ModelManager's post_processor hook; UQ docs#217
Conversation
ModelManager now runs a user post_processor callback between two simulator hooks: a non-destructive postSimulationProcessing and a destructive postSimulationCleanup, so a callback always sees intact output before PCMM prunes it. This moves PCMM's pruning (previously in postSimulationProcessing) into the new postSimulationCleanup hook, and removes a stray pathToOutputFolder(::Integer) definition in loader.jl that shadowed ModelManager's re-exported generic function instead of extending it, making the SimulationProcess-argument method unreachable from PCMM's namespace. Also documents two other inherited ModelManager changes (batch run(Vector) and the max_evaluations budget now enforced before each batch), adds monadsTable docs, and renames the docs nav section "Experiments" to "Uncertainty Quantification" to match ModelManager. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR aligns PhysiCellModelManager.jl with ModelManager’s new per-simulation hook ordering by moving PCMM’s destructive “pruning + err-file handling” work into postSimulationCleanup, ensuring a user post_processor callback runs against intact simulation outputs. It also removes a pathToOutputFolder(::Integer) definition that previously shadowed (rather than extended) ModelManager’s generic, and updates UQ documentation (including monadsTable, batch run(Vector), and max_evaluations semantics) while bumping the package version.
Changes:
- Move destructive post-simulation behavior from
postSimulationProcessingtopostSimulationCleanupsopost_processorsees un-pruned outputs. - Remove
pathToOutputFolder(::Integer)fromsrc/loader.jlto avoid shadowing ModelManager’s API. - Add/adjust docs for
monadsTable, batchedrun(Vector), andmax_evaluationsbehavior; bump version to0.3.3.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test-scripts/PrunerTests.jl | Adds a regression test asserting outputs are intact during post_processor and pruned after cleanup. |
| src/simulator_interface.jl | Switches PCMM’s hook implementation to extend postSimulationCleanup and updates hook docs. |
| src/loader.jl | Removes a local pathToOutputFolder(::Integer) that shadowed ModelManager’s generic. |
| README.md | Documents the new post_processor hook behavior and where results are stored/read. |
| Project.toml | Bumps package version to 0.3.3. |
| progress.md | Adds a development log entry describing the hook split and doc updates. |
| PRD.md | Adds a feature spec section describing the post-processing hook contract and QoI behavior. |
| docs/src/man/querying_parameters.md | Documents monadsTable as the monad-level analogue of simulationsTable. |
| docs/src/man/examples.md | Adds recipe for batching pre-built trials into a single run(Vector) call. |
| docs/src/man/calibration.md | Clarifies max_evaluations enforcement and that it counts particles/monads, not simulations. |
| docs/make.jl | Renames nav section “Experiments” → “Uncertainty Quantification”. |
Task B: builds on the post_processor hook to give users a one-line QoI callback for per-cell-type population counts at the final snapshot or any indexed save, instead of requiring them to hand-write a callback around PhysiCell loaders. Also documents the post-processing workflow end-to-end in analyzing_output.md (deferred until this builder existed), and notes in CLAUDE.md/PRD.md that wiring these builders into sensitivity analysis and calibration is a separate, not-yet-done step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ubmission failures
…progress reporting to calibration documentation
Summary
post_processorcallback between two simulator hooks: a non-destructivepostSimulationProcessingand a new destructivepostSimulationCleanup, so a callback always sees intact simulation output before PCMM prunes it. This moves PCMM's pruning (previously inpostSimulationProcessing) into the newpostSimulationCleanup.pathToOutputFolder(::Integer)insrc/loader.jlshadowed ModelManager's re-exported generic function instead of extending it, making theSimulationProcess-argument method (needed by apost_processor) unreachable from PCMM's namespace. Removed — PCMM now relies purely on ModelManager'spathToOutputFolder.monadsTablesection (new ModelManager export), documents batchrun(Vector)and themax_evaluationsbudget behavior (now enforced before each batch, and counts particles/monads not simulations), and renames the docs nav section "Experiments" → "Uncertainty Quantification" to match ModelManager's naming.PhysiCellModelManagerto0.3.3.This branch was developed and tested against a local dev checkout of ModelManager (the version with
postSimulationCleanup/ the reordered hooks /monadsTableis not yet registered). CI on this PR will likely fail to resolve/precompile against the currently registered ModelManager0.7.xuntil that version is released. Do not treat that as a regression in this PR — hold merge until the corresponding ModelManager release lands, then re-run CI.Test plan
Pkg.test()) against the ModelManager dev checkout, including a newPrunerTests.jlcase: apost_processorreadingpathToOutputFolder(sp)sees output present (viaoutput*.matfiles) during the callback, and confirms it's pruned only afterward.post_processorisn't used.🤖 Generated with Claude Code