From 064965527bd9b16fd77cfd5477b429cf6578c03b Mon Sep 17 00:00:00 2001 From: jiaopenglong <44927264+JiaoPL@users.noreply.github.com> Date: Mon, 25 Sep 2023 17:30:36 +0800 Subject: [PATCH] fix(config): monitor config key error when args_check is False (#362) * add monitor switch * add switch to light monitor * fix alert_address is empty * fix light monitor heartbeat * init light_monitor on rank_log only * add comments to the monitoring config * optimize config * fix monitor config key error when args_check is False --- internlm/initialize/launch.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/internlm/initialize/launch.py b/internlm/initialize/launch.py index 323715e0..429beef8 100644 --- a/internlm/initialize/launch.py +++ b/internlm/initialize/launch.py @@ -468,13 +468,14 @@ def initialize_distributed_env( args_sanity_check() # init light monitor client - alert_config = gpc.config.monitor.alert - if alert_config.enable_feishu_alert and gpc.is_rank_for_log(): - light_monitor_address = alert_config.light_monitor_address - if light_monitor_address: - initialize_light_monitor(light_monitor_address) - else: - logger.warning("monitor address is none, monitor could not be used!") + if gpc.config.get("monitor") and gpc.config.monitor.get("alert"): + alert_config = gpc.config.monitor.alert + if alert_config.enable_feishu_alert and gpc.is_rank_for_log(): + light_monitor_address = alert_config.light_monitor_address + if light_monitor_address: + initialize_light_monitor(light_monitor_address) + else: + logger.warning("monitor address is none, monitor could not be used!") def get_config_value(config, key, defalut):