From c0289ac2a65d9f8dda5504eb6be480ce2f28c9c1 Mon Sep 17 00:00:00 2001 From: JiaoPL Date: Thu, 7 Sep 2023 15:05:59 +0800 Subject: [PATCH] add comments to the monitoring config --- internlm/initialize/launch.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internlm/initialize/launch.py b/internlm/initialize/launch.py index c739f76..9e172cf 100644 --- a/internlm/initialize/launch.py +++ b/internlm/initialize/launch.py @@ -253,16 +253,23 @@ def args_sanity_check(): gpc.config.parallel.sequence_parallel is True and gpc.config.model.use_flash_attn is False ), "sequence parallel does not support use_flash_attn=False" - # feishu webhook address for alerting + # monitoring config + # compatible with old alert config + if "alert_address" not in gpc.config: + gpc.config._add_item("alert_address", None) + # set default values for the new monitoring config if "monitor" not in gpc.config: gpc.config._add_item("monitor", {}) if "alert" not in gpc.config.monitor: gpc.config.monitor._add_item("alert", {}) alert = gpc.config.monitor.alert + # the alert switch is set to False by default if "enable_feishu_alert" not in alert: alert._add_item("enable_feishu_alert", False) + # the feishu alert address is set to None by default if "feishu_alert_address" not in alert: alert._add_item("feishu_alert_address", None) + # check the monitoring config if alert.enable_feishu_alert: if not alert.feishu_alert_address and gpc.is_rank_for_log(): alert.feishu_alert_address = None