ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
Find a file
pengwa 65b316a138
Consolidate ORTModule logging (#16078)
### Consolidate ORTModule logging

There are few improvements for ORTModule loggings:
- All ORTModule logging are used logger that is initialized in
`ortmodule.py`.
- Manage all export logs same way, e.g. use `
_logger.suppress_os_stream_output(log_level=self._debug_options.logging.log_level)`
to control exporting related logs suppressing or not. If any warning or
errors suppressed, `self._warning_log_detected_during_export` will be
set to True, then when we log ORTModule feature matrix, we will also
told users there are logs suppressed.
- Downgrade some warnings. We had some warnings for years, and looks
many models have them by default, no action we actually can take, so
downgrade them to make user logging cleaner.
- PyTorch export requires update of custom export function signature
changes, otherwise, _symbolic_context_handler complains with warnings,
so update custom export function adaption for version >=1.13 PyTorch.
- Add ORTModule feature matrix summary, **this is supposed to be only
places users see our logs by default** (unless they use INFO or
VERBOSE). Features ON/OFF states are shown clearly to them in case they
want to try some features in OFF states. This logs only shows up in rank
0 (if there are multiple rank), the intention is we want user to see a
useful and clean output from ORTModule by default. The outputs shown as
below:



![image](https://github.com/microsoft/onnxruntime/assets/10530022/9c6653ac-50fa-4b2d-ba7f-4d5ce44b25b2)


![image](https://github.com/microsoft/onnxruntime/assets/10530022/10dff5a9-2d46-4646-a4b4-2c515566376e)


- `reinitialize_ortmodule` in util.py is only used by ortmodule.py,
moving it into ortmodule.py, then utils takes no dependency on
`orttraining/orttraining/python/training/ortmodule/_custom_op_symbolic_registry.py`,
then `_custom_op_symbolic_registry.py` can call functions defined in
utils.py (without recursively include).
2023-06-01 10:09:12 +08:00
.config
.devcontainer
.gdn
.github Update github issue template for 'web': add EP (#15955) 2023-05-16 23:50:33 -07:00
.pipelines [DML EP] Update DirectML version to 1.12.0 (#16011) 2023-05-18 19:37:12 -07:00
.vscode
cgmanifests Update cgmanifests/generated/cgmanifest.json to fix a syntax error (#15997) 2023-05-18 15:03:06 -07:00
cmake Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
csharp Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
dockerfiles Remove Ubuntu 18.04 usages (#15781) 2023-05-11 11:44:00 -07:00
docs Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
include/onnxruntime/core Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
java Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
js [js/web] disable node fallback in webpack (#16166) 2023-05-31 16:47:00 -07:00
objectivec Add iOS Swift Package Manager support (#15297) 2023-04-20 16:18:35 +10:00
onnxruntime Fix a misaligned error in CUDA GEMM (#16130) 2023-05-31 18:10:17 -07:00
orttraining Consolidate ORTModule logging (#16078) 2023-06-01 10:09:12 +08:00
rust Add rust bindings (#12606) 2023-02-08 14:57:15 -08:00
samples Enable pylint and numpy rules (#15218) 2023-03-27 20:37:53 -07:00
swift/OnnxRuntimeBindingsTests Add iOS Swift Package Manager support (#15297) 2023-04-20 16:18:35 +10:00
tools extend mac packaging timeout limit (#16173) 2023-05-31 18:31:28 +08:00
winml Add GridSample implementation to DirectML (#15788) 2023-05-05 15:59:33 -07:00
.clang-format Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
.clang-tidy
.dockerignore
.gitattributes
.gitignore remove 'lib/' from .gitignore (#15613) 2023-04-24 18:43:32 -07:00
.gitmodules Update eigen to 3.4 and remove the eigen from git submodule (#15875) 2023-05-11 11:56:59 -07:00
.lintrunner.toml Enable RUFF as a formatter (#15699) 2023-04-26 14:04:07 -07:00
build.amd64.1411.bat
build.bat
build.sh
CITATION.cff
CODEOWNERS Add owners for public facing API files (#15288) 2023-03-30 17:16:15 -07:00
CONTRIBUTING.md Fix link to High Level Design (#11786) 2023-02-28 11:05:54 -08:00
lgtm.yml
LICENSE
NuGet.config
ort.wprp
ORT_icon_for_light_bg.png
Package.swift Add iOS Swift Package Manager support (#15297) 2023-04-20 16:18:35 +10:00
packages.config [DML EP] Update DirectML version to 1.12.0 (#16011) 2023-05-18 19:37:12 -07:00
pyproject.toml Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
README.md
requirements-dev.txt Remove codecov from requirements-dev.txt (#15487) 2023-04-12 18:48:02 -07:00
requirements-doc.txt
requirements-lintrunner.txt Enable RUFF as a formatter (#15699) 2023-04-26 14:04:07 -07:00
requirements-training.txt
requirements.txt.in
SECURITY.md
setup.py Fix python pipeline for AzureEP without using root (#16023) 2023-05-22 16:38:47 -07:00
ThirdPartyNotices.txt Implement openAI endpoint invoker for nuget (#15797) 2023-05-11 22:04:02 -07:00
VERSION_NUMBER Update VERSION_NUMBER (#15773) 2023-05-03 15:07:34 -07:00

ONNX Runtime is a cross-platform inference and training machine-learning accelerator.

ONNX Runtime inference can enable faster customer experiences and lower costs, supporting models from deep learning frameworks such as PyTorch and TensorFlow/Keras as well as classical machine learning libraries such as scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different hardware, drivers, and operating systems, and provides optimal performance by leveraging hardware accelerators where applicable alongside graph optimizations and transforms. Learn more →

ONNX Runtime training can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. Learn more →

Get Started & Resources

Build Pipeline Status

System Inference Training
Windows Build Status
Build Status
Build Status
Linux Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Mac Build Status
Android Build Status
iOS Build Status
Web Build Status
Other Build Status
Build Status

Data/Telemetry

Windows distributions of this project may collect usage data and send it to Microsoft to help improve our products and services. See the privacy statement for more details.

Contributions and Feedback

We welcome contributions! Please see the contribution guidelines.

For feature requests or bug reports, please file a GitHub Issue.

For general discussion or questions, please use GitHub Discussions.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

This project is licensed under the MIT License.