Skip to content

🔊 Add metrics to log MM embedding time#899

Merged
joerunde merged 1 commit intotorch-spyre:mainfrom
gkumbhat:add_mm_log_metrics
Apr 14, 2026
Merged

🔊 Add metrics to log MM embedding time#899
joerunde merged 1 commit intotorch-spyre:mainfrom
gkumbhat:add_mm_log_metrics

Conversation

@gkumbhat
Copy link
Copy Markdown
Collaborator

@gkumbhat gkumbhat commented Apr 6, 2026

Description

Add metric to log mm embedding calculation time.

Related Issues

Test Plan

Checklist

  • I have read the contributing guidelines
  • My code follows the project's code style (run bash format.sh)
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)
  • My commits include a Signed-off-by: line (DCO compliance)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

👋 Hi! Thank you for contributing to vLLM support on Spyre.
Just a reminder: Make sure that your code passes all the linting checks, otherwise your PR won't be able to be merged. To do so, run ./format.sh.
Now you are good to go 🚀.

We also recommend installing prek and configuring it to check your code before every local commit.

Signed-off-by: Gaurav-Kumbhat <Gaurav.Kumbhat@ibm.com>
@gkumbhat gkumbhat force-pushed the add_mm_log_metrics branch from 0c75c65 to 5525708 Compare April 6, 2026 20:47
logger.info("maybe_mm_embedding processing time: %.2fms", (t1 * 1000))
logger.info("maybe_mm_embedding processing time: %.2fms", (t_elapsed * 1000))
self.perf_logger.log(
"get_mm_embeddings_time_ms",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to be publishing a non-standard vllm metric here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was trying to find a similar metric from vllm that we could reuse, or push the numbers there. Haven't found one yet..

The idea here is to have a way to measure impact of MM processing.

Open to suggestions, if there is a better and more standard way to deal with this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@joerunde actually usage of create_perf_metric_logger already handles the optional enablement of this metric. So this will only get printed if we pass VLLM_SPYRE_PERF_METRIC_LOGGING_ENABLED env variable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

@gkumbhat gkumbhat marked this pull request as ready for review April 7, 2026 22:23
Copy link
Copy Markdown
Collaborator

@joerunde joerunde left a comment

Choose a reason for hiding this comment

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

lpgtm- from talking with @gkumbhat this is meant for development debugging, not for opsviz on deployed models, so we're using the spyre-specific perf logger here

@joerunde
Copy link
Copy Markdown
Collaborator

ah shoot GK I forgot to hit merge last week, sorry!

@joerunde joerunde merged commit ed732b0 into torch-spyre:main Apr 14, 2026
13 checks passed
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