-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix memory leak in TensorflowTransform #4223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach is fine for now. But as I discussed with @codemzs, we need to solve this issue all up in ML.NET. See #906 (which was closed for some reason?).
TensorFlow and Onnx transformers both have native resources that need to be cleaned up. And with #4157 we are adding even more transformers that require native resource clean up. Relying on Finalizers to do this cleanup is not ideal. Instead, we should allow users to dispose transformers that need disposing without relying on the Finalizer to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes two memory leaks:
This fixes #4134