-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Memory Leak in Autogen #4893
Comments
Thanks for creating the issue. A simple setup can be tried without the jupyter code executor to isolate the cause. And then add the jupyter executor to run a simple piece of code. See the difference. |
Here is a memory chart of my long running task: So yeah not great :D Debugging and isolating the cause is not too easy though. I think I was able to get something useful though. This is after one full iteration of run_task, so down in the for loop here, where everything should be cleaned up by the gather.
Looking at my debug output, it seems:
I am not too familar with the whole async stuff yet, but that line looks a little bit shady to me. I know Any thoughts on this? Edit: I cannot really reliably reproduce this. So maybe my theory is wrong here :( |
Ah! For 10+ years of me using Python I have never been a fan of its performance. If performance is really important for you. You might want to wait for our .NET release. cc @rysweet |
Well no, it is not really about performance here. My code (or autogens code) just leaks memory somewhere (not in the classical sense like in C++, but in the python sense that something is not garbarge collected until the very end of the program). |
Okay. Let's keep this thread open and come back to it when we have some more clarity. |
Thanks @ekzhu, you could be right about that. Possibly some interplay with gather() as I read something in that direction about it. I currently try to reproduce in a smaller setup.
What do you mean by runtime? My Task Runner? This basically just is:
I do not store anything in the object itself. So it was my assumption that agents should get cleaned up after run_agent is left.
The text was updated successfully, but these errors were encountered: