-
Notifications
You must be signed in to change notification settings - Fork 6k
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][1/n] Serve logging config API #40465
Conversation
Signed-off-by: Sihan Wang <sihanwang41@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
python/ray/serve/config.py
Outdated
""" | ||
|
||
encoding: Optional[EncodingType] = EncodingType.TEXT | ||
log_level: Optional[int] = logging.INFO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just learned those have numeric values XD Should we add an validation on the allowed values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh jeez it's not even an enum... https://github.com/python/cpython/blob/main/Lib/logging/__init__.py#L98
As this is written, in the config file users would need to look up the levels and convert them to an integer value... can we accept a Union[None, str, int]
and convert passed strings to ints under the hood?
python/ray/serve/config.py
Outdated
""" | ||
|
||
encoding: Optional[EncodingType] = EncodingType.TEXT | ||
log_level: Optional[int] = logging.INFO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh jeez it's not even an enum... https://github.com/python/cpython/blob/main/Lib/logging/__init__.py#L98
As this is written, in the config file users would need to look up the levels and convert them to an integer value... can we accept a Union[None, str, int]
and convert passed strings to ints under the hood?
python/ray/serve/schema.py
Outdated
@@ -63,6 +64,51 @@ def _route_prefix_format(cls, v): | |||
return v | |||
|
|||
|
|||
@PublicAPI(stability="alpha") | |||
class LoggingConfigSchema(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is LoggingConfigSchema different from LogginConfig? Is it possible to unify them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get rid of the config.py change and only keep the schema.py.
Signed-off-by: Sihan Wang <sihanwang41@gmail.com>
Signed-off-by: Sihan Wang <sihanwang41@gmail.com>
Given this isn't hooked up/implemented yet, let's wait until after branch cut to merge it. |
the branch is cut already! https://github.com/ray-project/ray/tree/releases/2.8.0 |
Why are these changes needed?
LoggingConfigSchema will be located in:
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.