Skip to content
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

Ensure metrics are logged regardless of requests #2347

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

ichernev
Copy link
Contributor

@ichernev ichernev commented Jan 4, 2024

Metrics are currently logged at the end of each step, but if there are no requests there are no new logs/metrics, so the last values are reported to prometheus indefinitely.

Also, for some reason, it always reports one running request.

@simon-mo simon-mo self-assigned this Jan 4, 2024
@simon-mo
Copy link
Collaborator

simon-mo commented Jan 4, 2024

nice catch! although a better UX would be to reset it just once so vLLM won't be spamming the same log message telling idle status every 10s. i'm having trouble coming up with a clean way to do it though.

@ichernev
Copy link
Contributor Author

ichernev commented Jan 4, 2024

If you have the instance running in kubernetes, every 15s it queries the /metrics and prints in the logs. If you really want to avoid the vllm log part (where it logs zeros over and over), I can add some ifs. I think it's not needed, let me know.

@ichernev ichernev marked this pull request as draft January 4, 2024 19:42
@ichernev
Copy link
Contributor Author

ichernev commented Jan 4, 2024

@simon-mo I'm a bit confused about the ray/remote logic. Should I call the do_log_stats via self.engine.do_log_stats.remote(), or there is something I'm missing.

Metrics are currently logged at the end of each step, but if there are
no requests there are no new logs/metrics, so the last values are
reported to prometheus indefinitely.

Also, for some reason, it always reports one running request.
@ichernev ichernev marked this pull request as ready for review January 4, 2024 21:11
Comment on lines +511 to +512
if self.engine_use_ray:
await self.engine.do_log_stats.remote()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah this is right.

@simon-mo simon-mo merged commit d0215a5 into vllm-project:main Jan 5, 2024
2 checks passed
@simon-mo
Copy link
Collaborator

simon-mo commented Jan 5, 2024

@ichernev thanks again. I think the current state is fine, therefore, merged. We can revisit this if people find the logs too spammy.

jedibrillo pushed a commit to jedibrillo/vllm that referenced this pull request Jan 5, 2024
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Jan 18, 2024
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
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.

None yet

2 participants