Skip to content

Commit 54f98fd

Browse files
deepcharmtjruwaseloadams
authored
Monitor was always enabled causing performance degradation (#5633)
The Boolean expression for the monitor to be enabled was incorrect, as instead of using the `enabled` field, it used the comet configuration object, making the expression always True. This caused performance degradation (we've observed ~10% drop) as it erroneously invoked the events logging flow along with the expensive calculation of `loss.mean().item()`. Co-authored-by: Olatunji Ruwase <[email protected]> Co-authored-by: Logan Adams <[email protected]>
1 parent 91a9986 commit 54f98fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deepspeed/monitor/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ class DeepSpeedMonitorConfig(DeepSpeedConfigModel):
140140
@root_validator
141141
def check_enabled(cls, values):
142142
values["enabled"] = values.get("tensorboard").enabled or values.get("wandb").enabled or values.get(
143-
"csv_monitor").enabled or values.get("comet")
143+
"csv_monitor").enabled or values.get("comet").enabled
144144
return values

0 commit comments

Comments
 (0)