-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Update logging config #30863
Update logging config #30863
Conversation
0ccb25f
to
307167a
Compare
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.
For rllib changes, I think we need rllib folks approval. cc @sven1977 who's the best person who can take a look at this PR?
307167a
to
d529f4f
Compare
# The logging configuration here is for the sidecar container, but we need the | ||
# logs to go to the same place as the head node logs because the autoscaler | ||
# is allowed to communicate with another Ray process (the log monitor) via logs | ||
# in that directory. However, the Ray head container sets up the log directory. |
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.
Could you split this sentence up?
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.
Definitely. I've split it up and reworded it - what do you think now?
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.
Looks good, thanks!
d529f4f
to
41794cf
Compare
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 though we still need approval from the rllib. I will ping one of guys there
can you also merge the latest master? |
cc @gjoliver to take a look |
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.
Thanks for this cleanup @peytondmurray ! One more thing for RLlib. Since we don't use the AlgorithmConfig.log_level
setting anymore, we should properly deprecate it.
In rllib/algorithms/algorithm_config.py
, can you:
self.log_level = "WARN" -> self.log_level = DERPECATED_VALUE
...
def debugging()
...
log_level: Optional[str] = NotProvided, -> log_level=DEPRECATED_VALUE,
...
# and further down in that same method:
if log_level != DERECATED_VALUE:
deprecation_warning(old="config.log_level", help="[describe here, how RLlib users should set their log levels, instead]", error=False)
Thanks so much!
41794cf
to
075f04c
Compare
Thanks @sven1977, I just pushed your requested changes. If the tests pass 🤞 I think we'll be good to merge. |
@sven1977 we need your approval for the merge! Thank you! |
Signed-off-by: pdmurray <peynmurray@gmail.com>
075f04c
to
930d6d1
Compare
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. Thanks for this PR @peytondmurray !
This reverts commit 608276b.
Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
Attempts to consolidate logging configuration by introducing reasonable defaults in ray/log.py. This new logging configuration is done once in ray/__init__.py at the top of the module. Subsequent calls to the configuration are ignored. A logger for ray.rllib is configured at the WARN level, to address Revert "Simplify logging configuration. (#30863)" #31858. With this change, Revert "Simplify logging configuration. (#30863)" #31858 can be reverted, again simplifying and consolidating logging configuration. Modified test_output.py::test_logger_config to test only the logger config, not launch a ray cluster. The test was failing intermittently, I think due to a race condition between the launch of the cluster and the reading of the subprocess's stdout, and anyway it wasn't necessary to call ray.init here to check that logging was configured correctly. Modified python/ray/tune/tests/test_commands.py::test_ls_with_cfg to test the underlying data, not what gets printed to stdout (which has changed with the new logging system). Modified a logging message in ray.tune.automl.search_policy.AutoMLSearcher.on_trial_complete, which in certain cases emits a logging message which tries to format a NoneType into a %f during log message formatting. This was a previously-undetected bug which showed up because the default log level is now INFO. This fixes a test that was failing in test_automl_searcher.py::AutoMLSearcherTest.
…ay-project#34182) Attempts to consolidate logging configuration by introducing reasonable defaults in ray/log.py. This new logging configuration is done once in ray/__init__.py at the top of the module. Subsequent calls to the configuration are ignored. A logger for ray.rllib is configured at the WARN level, to address Revert "Simplify logging configuration. (ray-project#30863)" ray-project#31858. With this change, Revert "Simplify logging configuration. (ray-project#30863)" ray-project#31858 can be reverted, again simplifying and consolidating logging configuration. Modified test_output.py::test_logger_config to test only the logger config, not launch a ray cluster. The test was failing intermittently, I think due to a race condition between the launch of the cluster and the reading of the subprocess's stdout, and anyway it wasn't necessary to call ray.init here to check that logging was configured correctly. Modified python/ray/tune/tests/test_commands.py::test_ls_with_cfg to test the underlying data, not what gets printed to stdout (which has changed with the new logging system). Modified a logging message in ray.tune.automl.search_policy.AutoMLSearcher.on_trial_complete, which in certain cases emits a logging message which tries to format a NoneType into a %f during log message formatting. This was a previously-undetected bug which showed up because the default log level is now INFO. This fixes a test that was failing in test_automl_searcher.py::AutoMLSearcherTest.
…ay-project#34182) Attempts to consolidate logging configuration by introducing reasonable defaults in ray/log.py. This new logging configuration is done once in ray/__init__.py at the top of the module. Subsequent calls to the configuration are ignored. A logger for ray.rllib is configured at the WARN level, to address Revert "Simplify logging configuration. (ray-project#30863)" ray-project#31858. With this change, Revert "Simplify logging configuration. (ray-project#30863)" ray-project#31858 can be reverted, again simplifying and consolidating logging configuration. Modified test_output.py::test_logger_config to test only the logger config, not launch a ray cluster. The test was failing intermittently, I think due to a race condition between the launch of the cluster and the reading of the subprocess's stdout, and anyway it wasn't necessary to call ray.init here to check that logging was configured correctly. Modified python/ray/tune/tests/test_commands.py::test_ls_with_cfg to test the underlying data, not what gets printed to stdout (which has changed with the new logging system). Modified a logging message in ray.tune.automl.search_policy.AutoMLSearcher.on_trial_complete, which in certain cases emits a logging message which tries to format a NoneType into a %f during log message formatting. This was a previously-undetected bug which showed up because the default log level is now INFO. This fixes a test that was failing in test_automl_searcher.py::AutoMLSearcherTest. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Why are these changes needed?
This PR simplifies some logging configuration in accordance with extended discussions with @xwjiang2010 and @rkooo567. Changes:
python/ray/autoscaler/_private/local/node_provider.py
to discourage use within raylogservicer.py
(mostly for myself) that the logging configuration there is not to be messed with because it runs in a separate threadrelease/ray_release/logger.py
,rllib/examples/sumo_env_local.py
, andrllib/examples/tune/framework.py
,python/ray/_private/runtime_env/_clonevirtualenv.py
rllib
andexperimental/raysort/main.py
; we will use the global ray logging configuration here moving forwardrllib
can no longer be set fromAlgorithmConfig
; use standard logging configuration routes going forwardAnything that runs in a separate process was left unmodified, as per the discussion here: #30005.
Related issue number
Partly addresses #30005.
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.