Add configurable engine log level#8067
Conversation
Introduce a top-level "log_level" config option (default "WARNING") and apply it during engine init via the existing set_log_level_from_string helper, so the DeepSpeed logger verbosity is config-driven instead of hard-coded. Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com> Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 566214f3d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| self._do_args_sanity_check(args) | ||
| self._configure_with_arguments(args, mpu) | ||
| self._do_sanity_check() | ||
| set_log_level_from_string(self.log_level()) |
There was a problem hiding this comment.
Respect launcher log-level overrides
In launcher runs, deepspeed/launcher/runner.py:574 forwards --log_level and deepspeed/launcher/launch.py:151 applies it before the user script starts, but configs that omit the new key now reach this line with LOG_LEVEL_DEFAULT = "WARNING". That silently downgrades explicit --log_level debug/info and also weakens --quiet/error back to warnings during engine construction unless users duplicate the setting in ds_config.json, so the existing CLI verbosity control no longer works for ordinary launcher invocations. Only override the logger when the config key is present, or default to the current logger level instead.
Useful? React with 👍 / 👎.
Summary
log_levelconfig option (string, default"WARNING").set_log_level_from_stringhelper, so DeepSpeed logger verbosity is config-driven instead of hard-coded.Test plan
log_level="ERROR"-> DeepSpeed logger level is ERROR.log_level-> defaults toWARNING(no change vs. today's effective verbosity).Made with Cursor