Fix the confused enable_early_stop when only set early_stop_config #3214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pcard-71500
修复enable_early_stop在api_server.log中同时显示True和False的迷惑日志。
问题分析:
启动在线服务时,如果只设置了early_stop_config的参数,没有设置enable_early_stop时,api_server.log在启动好服务后会打印启动参数信息(见下图),这时候enable_early_stop会使用默认值False,但是由于设置了early_stop_config,这个config里面的enable_early_config会显示为True,导致无法确认是否启用early_stop功能。

early_stop只要设置了early_stop_config就一定会根据config内的参数决定是否启动early_stop功能,这时候enable_early_stop的值就不重要了。所以本PR在处理启动参数时新增了对early_stop_config和enable_early_stop的对齐,消除迷惑日志。最终日志如下图。
