Skip to content
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

Temp ONNX model files not cleaned up if dispose is not called. #5764

Closed
michaelgsharp opened this issue Apr 26, 2021 · 1 comment
Closed
Labels
loadsave Bugs related loading and saving data or models onnx Exporting ONNX models or loading ONNX models P1 Priority of the issue for triage purpose: Needs to be fixed soon.

Comments

@michaelgsharp
Copy link
Member

Right now when we use an ONNX model that is saved inside an ML.NET model, we create a new temp file for the ONNX model. This temp file is only cleaned up if the user manually calls dispose on the loaded ML.NET model. This is a problem because the base ITransformer that is loaded from Model.Load is not disposable. You need to know you have to manually cast it to IDisposable to dispose of it correctly. It also is a problem because the temp file name is not recorded anywhere (other than inside the class itself), so its hard to manually clean it up as well.

@michaelgsharp michaelgsharp added P1 Priority of the issue for triage purpose: Needs to be fixed soon. onnx Exporting ONNX models or loading ONNX models loadsave Bugs related loading and saving data or models labels Apr 26, 2021
@ericstj
Copy link
Member

ericstj commented May 19, 2021

Fixed in #5782

@ericstj ericstj closed this as completed May 19, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
loadsave Bugs related loading and saving data or models onnx Exporting ONNX models or loading ONNX models P1 Priority of the issue for triage purpose: Needs to be fixed soon.
Projects
None yet
Development

No branches or pull requests

2 participants