Closed nicfel closed 5 years ago
Swapping the state should make the logger log the newly swapped state, so I am curious, why do you need to swap loggers?
I don't actually swap states anymore, but only swap the operator, loggers and heating parameters between the chains. This avoid some recalculation and also avoids some issues with packages where swapping states is not that trivial
I can see some recalculation can be prevented (did you time the advantage?), but the second reason sounds not quite right: any state inside a CalculationNode
should be reconstructable by refreshing the State
, and a call of State.robustlyCalcPosterior()
. The only exception I can think of is when the CalculationNode
is stochastic, but even then, robustlyCalcPosterior()
should put it in a valid state. Did I miss something?
There is quite large time advantages for IM models, since robust calculation are a lot more expensive than an average recalculation from after normal operation. I guess the same applies to StarBeast analysis.
The only exception I can think of is when the CalculationNode is stochastic, but even then, robustlyCalcPosterior() should put it in a valid state. Did I miss something?
I ran into issues with bacter when swapping states.
For only swapping loggers instead of states, I swap PrintStreams in the logger class and Accepted/Rejected values in the operator classes. To do so, I currently need to adapt the core Logger and Operator class at the moment: Logger has to have:
and Operator has to have:
Extending the Logger class should be easy, but extending the Operator class requires also to adapt Operator Scheduling etc.