-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[ONNX] ONNX Exporter logging #71342
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
[ONNX] ONNX Exporter logging #71342
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slowFor more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit da7022b (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
thiagocrepaldi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great. Just have made a comment on how to initialize/enabled/disable the log
adc11eb to
68eb882
Compare
|
@BowenBao Will this be merged into pytorch:master directly or should we change it to pytorch:onnx_ms_1? |
I'm planning to directly merge into master. |
3532c6c to
a64a27d
Compare
|
@msaroufim has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1e94515 to
dd7c9fd
Compare
|
@msaroufim has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@BowenBao what is procedure when a PR waiting to be imported conflicts with master? do we have to rebase it and ask for another import? |
If the PR is not imported, you should rebase it. |
Update for mypy fix docs update api update docs on api change clang-tidy Fix node name printing address comments nit
dd7c9fd to
da7022b
Compare
|
@msaroufim has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Trying to land again |
Summary: Add ONNX exporter logging facility. Supporting both C++/Python logging api. Logging can be turned on/off. Logging output stream can be either set to `stdout` or `stderr`. A few other changes: * When exception is raised in passes, the current IR graph being processed will be logged. * When exception is raised from `_jit_pass_onnx` (the pass that converts nodes from namespace `ATen` to `ONNX`), both ATen IR graph and ONNX IR graph under construction will be logged. * Exception message for ConstantFolding is truncated to avoid being too verbose. * Update the final printed IR graph with node name in ONNX ModelProto as node attribute. Torch IR Node does not have name. Adding this to printed IR graph helps debugging. Pull Request resolved: #71342 Reviewed By: msaroufim Differential Revision: D34433473 Pulled By: malfet fbshipit-source-id: 4b137dfd6a33eb681a5f2612f19aadf5dfe3d84a
|
Hey @BowenBao. |
Summary: Add ONNX exporter logging facility. Supporting both C++/Python logging api. Logging can be turned on/off. Logging output stream can be either set to `stdout` or `stderr`. A few other changes: * When exception is raised in passes, the current IR graph being processed will be logged. * When exception is raised from `_jit_pass_onnx` (the pass that converts nodes from namespace `ATen` to `ONNX`), both ATen IR graph and ONNX IR graph under construction will be logged. * Exception message for ConstantFolding is truncated to avoid being too verbose. * Update the final printed IR graph with node name in ONNX ModelProto as node attribute. Torch IR Node does not have name. Adding this to printed IR graph helps debugging. Pull Request resolved: #71342 Reviewed By: msaroufim Differential Revision: D34433473 Pulled By: malfet fbshipit-source-id: 4b137dfd6a33eb681a5f2612f19aadf5dfe3d84a (cherry picked from commit 67a8ebe)
Add ONNX exporter logging facility. Supporting both C++/Python logging api. Logging can be turned on/off. Logging output stream can be either set to
stdoutorstderr.A few other changes:
_jit_pass_onnx(the pass that converts nodes from namespaceATentoONNX), both ATen IR graph and ONNX IR graph under construction will be logged.