axon
axon copied to clipboard
Avoid recompilations in user-defined transformations of loop state
As one example validate forwards metrics to the outer loop state and thus after it runs the loop step needs to be recompiled. This is possible in other handlers as well if user's want to forward user-defined state for use later. This is something we should try to avoid if at all possible
Why does it need to be recompiled? If the shape of the metrics is the same, there is no recompilation. Or do you mean something like this happens:
- Metrics starts empty on first loop
- Metrics are filled at the end of the first loop with new values
- Metrics starts second loop with new values
If that's the case, recompilation happens twice... which we may want to avoid?
Some options for fixes are:
- Initialize metrics to bogus values
- Or separate the metrics internal state from their reported state
This has been mostly resolved, there will be recompilations in certain cases, but I added a note to the docs about those!