Skip to content

Commit

Permalink
Refactor check_enabled root validator in DeepSpeedMonitorConfig (#3616)
Browse files Browse the repository at this point in the history
* Refactor check_enabled root validator in DeepSpeedMonitorConfig

* formatting

* formatting

---------

Co-authored-by: Michael Wyatt <[email protected]>
Co-authored-by: Michael Wyatt <[email protected]>
  • Loading branch information
3 people authored Jun 2, 2023
1 parent 5d14afd commit 4559aa9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deepspeed/monitor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class DeepSpeedMonitorConfig(DeepSpeedConfigModel):

@root_validator
def check_enabled(cls, values):
values["enabled"] = False
if (values.get("tensorboard").enabled or values.get("wandb").enabled or values.get("csv_monitor").enabled):
values["enabled"] = True
values["enabled"] = values.get("tensorboard").enabled or values.get("wandb").enabled or values.get(
"csv_monitor").enabled
return values

0 comments on commit 4559aa9

Please sign in to comment.