This type of exception is raised for errors that are directly caused by the user code. In general, user errors happen during model authoring, tracing, using our public facing APIs, and writing graph passes.
| 44 | |
| 45 | |
| 46 | class ExportError(Exception): |
| 47 | """ |
| 48 | This type of exception is raised for errors that are directly caused by the user |
| 49 | code. In general, user errors happen during model authoring, tracing, using our public |
| 50 | facing APIs, and writing graph passes. |
| 51 | """ |
| 52 | |
| 53 | def __init__(self, error_code: ExportErrorType, message: str) -> None: |
| 54 | prefix = f"[{error_code}]: " |
| 55 | super().__init__(prefix + message) |
no outgoing calls