Skip to content

Commit

Permalink
handle existing empty loss_functions dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque committed Jun 21, 2024
1 parent 1a67cf9 commit 9e87586
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fairchem/core/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,8 @@ def update_config(base_config):
are now. Update old configs to fit the new expected structure.
"""
### TODO: better format check for older configs
if "loss_functions" in base_config:
# some configs have a loss_functions key with an empty dictionary, those need to be updated as well
if len(base_config.get("loss_functions", {})) > 0:
return base_config

logging.warning(
Expand Down

0 comments on commit 9e87586

Please sign in to comment.