Skip to content

Commit

Permalink
fix(config): monitor config key error when args_check is False (Inter…
Browse files Browse the repository at this point in the history
…nLM#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
  • Loading branch information
JiaoPL authored Sep 25, 2023
1 parent 26a7397 commit 0649655
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions internlm/initialize/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0649655

Please sign in to comment.