Skip to content

fix(callbacks): log metric callbacks#713

Open
sarvesh1327 wants to merge 2 commits into
Lightning-AI:mainfrom
sarvesh1327:fix/callback-metrics-logger
Open

fix(callbacks): log metric callbacks#713
sarvesh1327 wants to merge 2 commits into
Lightning-AI:mainfrom
sarvesh1327:fix/callback-metrics-logger

Conversation

@sarvesh1327

Copy link
Copy Markdown

Summary

  • Replaces the default metric callback print() calls with module logger calls.
  • Keeps prediction timing and active-request messages visible, while allowing logging handlers/configuration to capture and route them.
  • Updates callback tests to assert log records for the direct callback paths and preserves the integration stdout assertion for the worker-process path.

Test Plan

  • uv run python -m pytest tests/unit/test_callbacks.py -q
  • uv run ruff check src/litserve/callbacks/defaults/metric_callback.py tests/unit/test_callbacks.py
  • uv run python -m py_compile src/litserve/callbacks/defaults/metric_callback.py tests/unit/test_callbacks.py
  • git diff --check

Refs #696

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.

2 participants