-
Notifications
You must be signed in to change notification settings - Fork 3k
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
quant_pre_process on Windows will raise PermissionError when trying to remove temporary directory #17627
Comments
I am currently use microsoft/Olive@86c461a to workaround the issue |
## Describe your changes - move the onnxruntime import for calibrate to vitis execution to fix the onnxruntime 1.6 compatibility issue with openvino - pin resnet ORT version to wait microsoft/onnxruntime#17619 to be fixed. - disable vitis test for ORT 1.16 since the calibrator API is changed. - pin ort extension to 0.8.0 since the check_model will fail with latest version. - copy quant_pre_process code to olive to work-around the Windows temp folder clean permission error. microsoft/onnxruntime#17627 ## Checklist before requesting a review - [ ] Add unit tests for this change. - [x] Make sure all tests can pass. - [ ] Update documents if necessary. - [x] Format your code by running `pre-commit run --all-files` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. ## (Optional) Issue link
https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/tools/quantization/shape_inference.py#L79-L102 https://github.com/microsoft/Olive/blob/f04ed7123d9683a384e966979eb14fe72902ba6b/test/unit_test/passes/onnx/test_model_optimizer.py#L43-L45 |
Somehow when the context of temp directory is end, the ort session do not be cleaned which is occupying the external data file.
|
@trajepl, could you please create a PR to fix the issue? |
Sure. Created one into main branch. #17697. Please help take a look~ :) Oh, besides, I have no idea about how to write a sufficient test case for this issue. Just test it in Olive side. microsoft/Olive#609 |
### Description <!-- Describe your changes. --> Fix for this issue which raise the error of FileNotAccessd in windows when the context of TemporaryDirectory finished. #17627 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> #17627
### Description <!-- Describe your changes. --> Fix for this issue which raise the error of FileNotAccessd in windows when the context of TemporaryDirectory finished. #17627 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> #17627
### Description <!-- Describe your changes. --> Fix for this issue which raise the error of FileNotAccessd in windows when the context of TemporaryDirectory finished. microsoft#17627 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> microsoft#17627
Describe the issue
In ORT 1.16.0, the quant_pre_process will raise the following exception when Olive is running in Windows.
The quant_pre_process works fine for ORT 1.15.1.
To reproduce
https://aiinfra.visualstudio.com/PublicPackages/_build/results?buildId=357498&view=logs&jobId=aaa819ba-d3b3-5f6a-9167-927525a92668&j=aaa819ba-d3b3-5f6a-9167-927525a92668&t=11258177-43ed-56c7-2af4-75f6baa69786
Urgency
The issue cannot be reproed locally. But it will be reproed 100% in CI pipelines.
Platform
Windows
OS Version
10
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.16
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: