Skip to content

[QwixQuantStat] Refactor _collect_quant_stat to _update_and_get_quant_stat.#258

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_900895282
Open

[QwixQuantStat] Refactor _collect_quant_stat to _update_and_get_quant_stat.#258
copybara-service[bot] wants to merge 1 commit intomainfrom
test_900895282

Conversation

@copybara-service
Copy link
Copy Markdown

[QwixQuantStat] Refactor _collect_quant_stat to _update_and_get_quant_stat.

The internal method _collect_quant_stat was misleading as it both updates the running quantization statistics (using SimpleMovingAverage) and returns the current averaged calibration data.

This CL renames it to _update_and_get_quant_stat across the qwix codebase to better reflect this dual responsibility.

Implementation Details:

  • Updated OdmlQatProvider and QtProvider to use the new method name.
  • Clarified docstrings to explain the update-and-return behavior.
  • Updated internal references in odml_ops.py and experimental scripts.
  • Associated configuration field names (e.g., lhs_collect_quant_stat) are kept as-is to maintain API stability while the underlying implementation is improved.
  • Fixed a syntax error in an experimental script blocking formatting.

…_stat.

The internal method _collect_quant_stat was misleading as it both updates the running quantization statistics (using SimpleMovingAverage) and returns the current averaged calibration data.

This CL renames it to _update_and_get_quant_stat across the qwix codebase to better reflect this dual responsibility.

Implementation Details:
- Updated OdmlQatProvider and QtProvider to use the new method name.
- Clarified docstrings to explain the update-and-return behavior.
- Updated internal references in odml_ops.py and experimental scripts.
- Associated configuration field names (e.g., lhs_collect_quant_stat) are kept as-is to maintain API stability while the underlying implementation is improved.
- Fixed a syntax error in an experimental script blocking formatting.

PiperOrigin-RevId: 900895282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant