Not enough memory when I need many data that be probed

@Seanny123 How would you provide the weights as input to the node?

Also @drasmuss’s solution has some pitfalls and will save the data from the first simulation run in all steps. This is happens because the access via sim.data is internally cached and it is assumed that the amount of probe data in sim.model.params[probe] always grows. However, the size of the probed data will the same in each loop and sim.data will always return the result cached in the first loop. Two things could be done, to actually save the desired data: either always access it via sim.model.params[p] (this will give you a list instead of a NumPy array; I also think that the sim.model.params access is considered an implementation detail and might change in future versions), or clear the sim.data cache with sim.data.reset() in each loop.

@ZhangPeng I assume setting sample_every to a higher value to record less samples overall is not an option?

Some related things from GitHub: