Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Catch exception from ONNX conversion #4034

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

ultmaster
Copy link
Contributor

No description provided.

try:
self.to_onnx(self.export_onnx, x, export_params=True)
except RuntimeError as e:
warnings.warn(f'ONNX conversion failed. As a result, you might not be able to use visualization. Error message: {e}')
Copy link
Contributor

@chenbohua3 chenbohua3 Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when fail to export onnx, does self._already_exported should be False?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't try to export again.

@QuanluZhang QuanluZhang merged commit 5f91bdf into microsoft:master Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants