MCMCMonitorData.ts (the main client-side data cache manager):
Add isUpToDate optional member to the SequenceStats and VariableStats types.
Formally define dictionary of these keyed sets of statistics in the MCMCMonitorData client-side data cache.
Add function (applicable to both) which invalidates either one key or the whole dictionary, without deleting its existing data.
updateSequenceStats.ts -- sequence-stats updater called at each update check
Test for up-to-date-ness now based on the flag, rather than checking whether the mean is defined
Do not mark empty sequences as up-to-date
updateVariableStats.ts -- variable-stats updater called at each update check
Test for up-to-date-ness now based on the flag, rather than checking whether mean is defined
This doesn't need to be as fussy about marking empty data as up-to-date--if that does happen, the underlying sequence data will refresh shortly, which will invalidate the overall variable data as well
Acceptance testing:
Ensured the existing issue was reproducible on main branch with default example (e.g. by changing the set of selected variables or the number of warmup iterations)
Implemented changes and reran test. Confirmed that values are initially populated as expected, and that they no longer flicker to an unpopulated state between updates. Confirmed that values do still update when changes are made.
Resolves issue #8.
Principal changes:
MCMCMonitorData.ts
(the main client-side data cache manager):isUpToDate
optional member to the SequenceStats and VariableStats types.MCMCMonitorData
client-side data cache.updateSequenceStats.ts
-- sequence-stats updater called at each update checkupdateVariableStats.ts
-- variable-stats updater called at each update checkAcceptance testing:
main
branch with default example (e.g. by changing the set of selected variables or the number of warmup iterations)