Code like this seems to be having impacts on memory efficiency
cl = np.array(list(claims(t, kind) for t in range(max_proj_len()))).transpose()
return cl @ disc_factors()[:max_proj_len()]
I imagine that the logic described in this blog post (https://modelx.io/blog/2022/03/26/running-model-while-saving-memory/) will allow for some slight modifications to be made so that the memory efficiency is much improved.