Skip to content

Commit

Permalink
Update run_callback.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nmvrs committed Jun 18, 2024
1 parent 9a1d452 commit dca8ee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moai/engine/run_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def on_train_batch_end(
Note: The value ``outputs["loss"]`` here will be the normalized value w.r.t ``accumulate_grad_batches`` of the
loss returned from ``training_step``.
"""
if C._MOAI_LOSSES_ in outputs and 'total' in outputs[C._MOAI_LOSSES_]:
if C._MOAI_LOSSES_ in outputs and "total" in outputs[C._MOAI_LOSSES_]:
if losses := toolz.merge(
outputs[f"{C._MOAI_LOSSES_}.weighted"],
{"total": outputs[f"{C._MOAI_LOSSES_}.total"]},
Expand Down

0 comments on commit dca8ee5

Please sign in to comment.