-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[core][logging] Remove actor/task prefix from the logs shown on the driver process #47703
[core][logging] Remove actor/task prefix from the logs shown on the driver process #47703
Conversation
@property | ||
def get_job_logging_config(self): | ||
"""Get the job's logging config for this worker""" | ||
if not hasattr(self, "core_worker"): |
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.
In a test case like test_namespace_validation, ray.init() throws an exception (code) before initializing the core_worker. As a result, when the test calls ray.shutdown, which also calls get_job_logging_config, the core_worker doesn't exist.
Signed-off-by: kaihsun <kaihsun@anyscale.com>
python/ray/_private/worker.py
Outdated
if not hasattr(self, "core_worker"): | ||
return None | ||
job_config = self.core_worker.get_job_config() | ||
if job_config.serialized_py_logging_config == b"": |
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.
if job_config.serialized_py_logging_config == b"": | |
if not job_config.serialized_py_logging_config: |
This handles both None and empty string cases
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.
what is "empty string" case?
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.
This check has already handled the case that when LoggingConfig
is None.
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 mean both serialized_py_logging_config
being None or b""
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.
when will serialized_py_logging_config
be None?
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 don't think it will now. It's just that not
can handle both so more robust.
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.
updated: 8b45732
…river process (ray-project#47703) Signed-off-by: kaihsun <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Why are these changes needed?
With this PR
Without this PR
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.