Change RuntimeError to ImportError - #17380
Merged
Merged
Conversation
pengwa
approved these changes
Sep 1, 2023
pengwa
deleted the
baijumeswani/fix-win-mac-training-cpu-package-import
branch
September 1, 2023 01:56
Contributor
Author
|
Thank you so much @pengwa :) |
Lafi7e
pushed a commit
that referenced
this pull request
Sep 1, 2023
The `onnxruntime-validation` for ORTModule checks for `ImportError`: https://github.com/microsoft/onnxruntime/blob/44101e877125eaa18e191793973a4e1a002c6eca/onnxruntime/python/onnxruntime_validation.py#L73-L75 If any other kind of error is raised, it does not silently fail and will raise an exception. This causes a problem when ortmodule is explicitly not made available on win/mac packages since we currently raise a RuntimeError. Resolves issue: microsoft/onnxruntime-training-examples#161
kleiti
pushed a commit
to kleiti/onnxruntime
that referenced
this pull request
Mar 22, 2024
The `onnxruntime-validation` for ORTModule checks for `ImportError`: https://github.com/microsoft/onnxruntime/blob/44101e877125eaa18e191793973a4e1a002c6eca/onnxruntime/python/onnxruntime_validation.py#L73-L75 If any other kind of error is raised, it does not silently fail and will raise an exception. This causes a problem when ortmodule is explicitly not made available on win/mac packages since we currently raise a RuntimeError. Resolves issue: microsoft/onnxruntime-training-examples#161
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
onnxruntime-validationfor ORTModule checks forImportError:onnxruntime/onnxruntime/python/onnxruntime_validation.py
Lines 73 to 75 in 44101e8
If any other kind of error is raised, it does not silently fail and will raise an exception. This causes a problem when ortmodule is explicitly not made available on win/mac packages since we currently raise a RuntimeError.
Resolves issue: microsoft/onnxruntime-training-examples#161