-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor errors according to pytorch/pytorch#135180
- Loading branch information
1 parent
1edda23
commit 47bf897
Showing
3 changed files
with
9 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,28 @@ | ||
class ExporterError(RuntimeError): | ||
class OnnxExporterError(RuntimeError): | ||
"""Error during export.""" | ||
|
||
pass | ||
|
||
|
||
class TorchExportError(ExporterError): | ||
class TorchExportError(OnnxExporterError): | ||
"""Error during torch.export.export.""" | ||
|
||
pass | ||
|
||
|
||
class OnnxConversionError(ExporterError): | ||
class ConversionError(OnnxExporterError): | ||
"""Error during ONNX conversion.""" | ||
|
||
pass | ||
|
||
|
||
class DispatchError(OnnxConversionError): | ||
class DispatchError(ConversionError): | ||
"""Error during ONNX Funtion dispatching.""" | ||
|
||
pass | ||
|
||
|
||
class GraphConstructionError(OnnxConversionError): | ||
class GraphConstructionError(ConversionError): | ||
"""Error during graph construction.""" | ||
|
||
pass | ||
|
||
|
||
class OnnxCheckerError(ExporterError): | ||
"""Error during ONNX model checking.""" | ||
|
||
pass | ||
|
||
|
||
class OnnxRuntimeError(ExporterError): | ||
"""Error during ONNX Runtime execution.""" | ||
|
||
pass | ||
|
||
|
||
class OnnxValidationError(ExporterError): | ||
"""Output value mismatch.""" | ||
|
||
pass |
This file contains 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