Skip to content

Commit

Permalink
don't log a value for domains with no data on a step
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Jan 18, 2024
1 parent 33600fd commit efbdd31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/levanter/doremi.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def doremi_step(state: DoremiState, ref, batch, domains):
"train/mean_excess_loss": mean_excess_loss,
"train/mean_proxy_loss": mean_proxy_loss,
**{f"alpha/{domain}": weight for domain, weight in alpha_dict.items()},
**{f"train/{domain}/loss": loss for domain, loss in per_domain_dict.items()},
# just skip domains with no excess loss
**{f"train/{domain}/excess_loss": loss for domain, loss in per_domain_dict.items() if loss > 0},
},
step=state._step,
)
Expand Down

0 comments on commit efbdd31

Please sign in to comment.