High Memory Usage when using offline_run from Agents.jl in for loops

Indeed I tried to run your MWE and calling GC.gc() inside the loop solves the issue. This to me indicates that probably the issue is related more to the internal handling of garbage collection in Julia, than a particular problem with Agents.jl itself, but I could be wrong. This seems somewhat similar to Different memory usage under Windows and linux? in spirit, so I would suggest to try it out on 1.10-rc2. Maybe it will magically work better as in that other thread :smile:

3 Likes