-
Notifications
You must be signed in to change notification settings - Fork 189
[Logging] Support logging once #1431
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
Conversation
Signed-off-by: Kyle Sayers <[email protected]>
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
Signed-off-by: Kyle Sayers <[email protected]>
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.
Might be worth adding this to a logger invocation somewhere in this PR, so we can see an example in the code
Signed-off-by: Kyle Sayers <[email protected]>
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.
very nice!
## Purpose ## * Test discrepancies between initialized parameters and values calculated by observers * Reveal potential issue with how qparams are initialized neuralmagic/compressed-tensors#308 * Add warning for when users attempt to quantize groups that aren't perfectly divisible ## Prerequisites ## * #1431 ## Changes ## * Added `test_observers_update` in `tests/llmcompressor/modifiers/calibration/test_observers.py` * Add a warning for attempts to quantize indivisible groups ``` Attempting to quantize a module weight whose columns (3420) are not divisible by group_size (128). This scheme is not supported by vLLM, please consider adjusting the group_size for modules with this number of columns ``` ## Testing ## * This test fails without CT changes, but succeeds with them --------- Signed-off-by: Kyle Sayers <[email protected]>
## Purpose ## * Add ability to log messages only once ## Changes ## * Add `support_log_once` filter * Integrate `_initialize_metric_logging` function to reduce verbosity ## Testing ## ```python3 from llmcompressor.logger import logger logger.bind(log_once=True).info("This will only log once") # 2025-05-14T10:14:30.987512-0400 | <module> | INFO - This will only log once logger.bind(log_once=True).info("This will only log once") logger.bind(log_once=True).info("This will only log once") logger.bind(log_once=True).info("This is unique") # 2025-05-14T10:14:42.987610-0400 | <module> | INFO - This is unique logger.bind(log_once=True).warning("This is unique") # 2025-05-14T10:14:57.907901-0400 | <module> | WARNING - This is unique ``` --------- Signed-off-by: Kyle Sayers <[email protected]>
## Purpose ## * Test discrepancies between initialized parameters and values calculated by observers * Reveal potential issue with how qparams are initialized neuralmagic/compressed-tensors#308 * Add warning for when users attempt to quantize groups that aren't perfectly divisible ## Prerequisites ## * vllm-project#1431 ## Changes ## * Added `test_observers_update` in `tests/llmcompressor/modifiers/calibration/test_observers.py` * Add a warning for attempts to quantize indivisible groups ``` Attempting to quantize a module weight whose columns (3420) are not divisible by group_size (128). This scheme is not supported by vLLM, please consider adjusting the group_size for modules with this number of columns ``` ## Testing ## * This test fails without CT changes, but succeeds with them --------- Signed-off-by: Kyle Sayers <[email protected]>
Purpose
Changes
support_log_once
filter_initialize_metric_logging
function to reduce verbosityTesting