ray icon indicating copy to clipboard operation
ray copied to clipboard

Turn off color logging prefix

Open maxliuofficial opened this issue 1 year ago • 2 comments

Why are these changes needed?

This pr adds optionality to turn off color logging from actors. This is useful in the case where the logs are outputted to a location that does not support ansi codes, which leads to messy logs.

Similarly to multi color logging, this option uses the RAY_COLOR_PREFIX env var, this time when set to 0. Slightly differently, setting to 0 disables all color logging, even the special cases of raylet / autoscaler. This seems like the more correct approach given the use case.

I also updated the relevant docs (lmk if there are any other relevant docs to this). Here is a screenshot of the local build. Screenshot 2024-05-09 at 12 36 34 AM

I didn't see any existing corresponding test file for this file, so I created one, and added some tests for this change. Please advise if there is a better place these tests should go, thanks!

Related issue number

Resolves #6855.

Checks

  • [x] I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • [x] I've run scripts/format.sh to lint the changes in this PR.
  • [x] I've included any doc changes needed for https://docs.ray.io/en/master/.
    • [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in doc/source/tune/api/ under the corresponding .rst file.
  • [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • [x] Unit tests
    • [ ] Release tests
    • [ ] This PR is not tested :(

maxliuofficial avatar May 09 '24 07:05 maxliuofficial

Please advise on failing rllib test, appears to be unrelated.

maxliuofficial avatar May 13 '24 01:05 maxliuofficial

@jjyao could you get some one from core team to review?

@maxliuofficial maybe sync your branch with latest master head.

aslonnie avatar May 13 '24 03:05 aslonnie