-
Notifications
You must be signed in to change notification settings - Fork 6.2k
[SERVE-657] Replace special characters by underscore to fix logging failure during serve.deploy() #52576
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
base: master
Are you sure you want to change the base?
Conversation
component_name = re.sub(FILE_NAME_REGEX, '_', component_name) | ||
component_id = re.sub(FILE_NAME_REGEX, '_', component_id) |
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.
@zcin, does this have any side effects on the service's ability to reference the correct app log on anyscale ?
Is component_id
user-provided? If not, maybe we can avoid applying the sub-operation on it.
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.
Hmm yeah I don't know the full implications of this, I would be hesitant to do this unless it's fully scoped out what the effects are.
@GeneDer might know more about the logging issue specifically.
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.
another way is to just provide some useful log statements to users that include WARN
or something.
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.
@GeneDer thoughts?
051a78a
to
d8c9481
Compare
Signed-off-by: Omkar Kulkarni <omkar@omkar-JKJHCX74L6.local>
0ed794b
to
5cda7d3
Compare
Signed-off-by: Omkar Kulkarni <omkar@omkar-JKJHCX74L6.local>
Signed-off-by: Omkar Kulkarni <omkar@omkar-JKJHCX74L6.local>
Why are these changes needed?
When creating a Serve deployment with a name containing a slash (such as
TextGenerationModel.options(name="huawei-noah/TinyBERT_General_4L_312D")
) leads to actor failures. The error occurs because the slash in the name is likely being used as a path separator in log files.Error:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ray/session_2025-03-11_16-02-48_264712_45753/logs/serve/replica_default_huawei-noah/TinyBERT_General_4L_312D_eo3vqu7d.log'
In general, any other special character used may cause the logger to crash. This branch fixes the issue by replacing all special characters with
_
for logging purposes.Related issue number
https://anyscale1.atlassian.net/browse/SERVE-657
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.