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

[Serve] logging_config cannot be passed as a dict to serve.run in local testing mode #50052

Open
paul-twelvelabs opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@paul-twelvelabs
Copy link

What happened + What you expected to happen

This works

ray.serve.run(Deployment.bind(), logging_config={"log_level": "WARNING"})

but this,

ray.serve.run(Deployment.bind(), logging_config={"log_level": "WARNING"}, _local_testing_mode=True)

fails with

  File ".venv/lib/python3.12/site-packages/ray/serve/api.py", line 462, in _run
    configure_component_logger(
  File ".venv/lib/python3.12/site-packages/ray/serve/_private/logging_utils.py", line 290, in configure_component_logger
    logger.setLevel(logging_config.log_level)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'log_level'

If it's a dict, I think the logging_config needs to converted to a LoggingConfig here.

This is low severity with the following simple workaround

ray.serve.run(Deployment.bind(), logging_config=LoggingConfig(log_level="WARNING"), _local_testing_mode=True)

Versions / Dependencies

ray==2.40.0
python==3.12

Reproduction script

see above.

Issue Severity

Low: It annoys or frustrates me.

@paul-twelvelabs paul-twelvelabs added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

1 participant