Skip to content

Respect vllm logging configs in vllm_spyre #281

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

Merged
merged 3 commits into from
Jul 7, 2025

Conversation

kazunoriogata
Copy link
Contributor

Description

vLLM has mechanism to change logging configuration by using environment variables. However, vllm_spyre does not refers to these environment variables, but it always configure python logging based on the hard coded default of vLLM. As a result, changing logging configuration results in mixing log messages of different configurations and generates inconsistent logs.

This PR updates initialization of python logger in vllm_spyer to respect the logging configs and use the same logging configuration as vllm.

Signed-off-by: Kazunori Ogata <[email protected]>
Copy link

github-actions bot commented Jul 3, 2025

👋 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, first install the linting requirements, then run format.sh and commit the changes. This can be done with uv directly:

uv sync --frozen --group lint --active --inexact

Or this can be done with pip:

uv pip compile --group lint > requirements-lint.txt
pip install -r requirements-lint.txt
bash format.sh

Now you are good to go 🚀

@joerunde
Copy link
Collaborator

joerunde commented Jul 3, 2025

Thanks @kazunoriogata!

Do you think it's possible to read the config from the vllm logger instead of reloading the file without validation?

Signed-off-by: Kazunori Ogata <[email protected]>
@kazunoriogata
Copy link
Contributor Author

@joerunde Thank you for the comment, but I don't think we can get the configs from vllm logger.

_configure_vllm_root_logger does not save the config dict. The config dict is thrown away after calling dictConfig(). I couldn't find a method to extract logging config or a list of formats/handlers/loggers from an existing logger (e.g., the root logger). So, I think we need to reloading the file.

Since errors like file-not-found or invalid-format should have raised an exception and should not reach the vllm-spyre logger initialization, I think we don't need the same file validation again.

Signed-off-by: Kazunori Ogata <[email protected]>
@joerunde
Copy link
Collaborator

joerunde commented Jul 7, 2025

Nice, thanks for looking into it! I'll get this merged

@joerunde joerunde merged commit 68120ad into vllm-project:main Jul 7, 2025
15 of 18 checks passed
@kazunoriogata kazunoriogata deleted the ogatak-logging-fix branch July 7, 2025 22:18
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