mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-18 18:52:16 +00:00
Update optimize_pipeline.py to use __name__ detection (#15866)
### Description <!-- Describe your changes. --> Use `__name__` detection in `optimize_pipeline.py`. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> It prevents unwanted execution of `main` when importing the file.
This commit is contained in:
parent
9328a0f955
commit
984dd02df3
1 changed files with 2 additions and 1 deletions
|
|
@ -312,4 +312,5 @@ def main():
|
|||
)
|
||||
|
||||
|
||||
main()
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue