Commit 0488e9a
[fix][5889686] AutoCast: Fix logger (#890)
## What does this PR do?
**Type of change:** Bug fix
**Overview:**
Previously relied on quantization logger, which caused logs to be
suppressed when onnx.autocast was used directly
Instead:
- Inherit format and level if called from onnx.quantization
- Configure independent format and level if called from onnx.autocast
## Before your PR is "*Ready for review*"
<!-- If you haven't finished some of the above items you can still open
`Draft` PR. -->
- **Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)**
and your commits are signed.
- **Is this change backward compatible?**: Yes <!--- If No, explain why.
-->
- **Did you write any new necessary tests?**: No
- **Did you add or update any necessary documentation?**: No
- **Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?**:
No <!--- Only for new features, API changes, critical bug fixes or bw
breaking changes. -->
## Additional Information
<!-- E.g. related issue. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved logging configuration to ensure consistent behavior across
modules with enhanced file and console output management.
* Fixed log file handling to automatically create required directories.
* Enhanced logger propagation logic for more reliable output routing.
* **Chores**
* Refined logging initialization for better automatic configuration at
startup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Gal Hubara Agam <96368689+galagam@users.noreply.github.com>1 parent 5c5a60f commit 0488e9a
2 files changed
+50
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | | - | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
39 | 58 | | |
40 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
44 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
45 | 73 | | |
46 | 74 | | |
47 | 75 | | |
| |||
50 | 78 | | |
51 | 79 | | |
52 | 80 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 81 | | |
57 | 82 | | |
58 | 83 | | |
59 | 84 | | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
67 | 100 | | |
68 | 101 | | |
69 | 102 | | |
70 | | - | |
| 103 | + | |
71 | 104 | | |
72 | 105 | | |
73 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments