Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/llmcompressor/evaluation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
Evaluation utilities for assessing the quality of compressed/quantized models.
"""

from llmcompressor.evaluation.kl_divergence import (
KLDivergenceResult,
evaluate_kl_divergence,
)

__all__ = ["evaluate_kl_divergence", "KLDivergenceResult"]
5 changes: 5 additions & 0 deletions src/llmcompressor/evaluation/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Allow running KL-divergence evaluation as ``python -m llmcompressor.evaluation.kl_divergence``."""
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module docstring says it can be run as python -m llmcompressor.evaluation.kl_divergence, but src/llmcompressor/evaluation/__main__.py is actually executed by python -m llmcompressor.evaluation. Update the docstring to reflect the correct invocation (or drop this file if it’s not intended).

Suggested change
"""Allow running KL-divergence evaluation as ``python -m llmcompressor.evaluation.kl_divergence``."""
"""Allow running KL-divergence evaluation as ``python -m llmcompressor.evaluation``."""

Copilot uses AI. Check for mistakes.

from llmcompressor.evaluation.kl_divergence import main

main()
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling main() at import time makes llmcompressor.evaluation.__main__ unsafe to import (it will execute the CLI immediately). Even though __main__ is typically only executed via python -m, it’s safer to wrap the call in an if __name__ == "__main__": guard.

Suggested change
main()
if __name__ == "__main__":
main()

Copilot uses AI. Check for mistakes.
Loading
Loading