As discussed in https://discourse.julialang.org/t/large-memory-consumption-when-using-mooncake-via-differentiationinterface-for-gaussian-process-optimisation/127289/8?u=willtebbutt , there's not currently a good way to clear the cached OpaqueClosures that Mooncake keeps around. We should probably add a function to the interface which promises to completely clear out any cached data that Mooncake currently holds on to.
As discussed in https://discourse.julialang.org/t/large-memory-consumption-when-using-mooncake-via-differentiationinterface-for-gaussian-process-optimisation/127289/8?u=willtebbutt , there's not currently a good way to clear the cached OpaqueClosures that Mooncake keeps around. We should probably add a function to the interface which promises to completely clear out any cached data that Mooncake currently holds on to.