Skip to content

Commit d2dc1d0

Browse files
committed
log to wandb
Signed-off-by: Ye Yu <yeyu@nvidia.com>
1 parent 4ca4d48 commit d2dc1d0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/speculative_decoding/eagle_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ def on_log(self, args, state, control, **kwargs):
211211

212212
# log to wandb
213213
if wandb and is_master():
214+
logs = kwargs.get("logs") or {}
215+
if logs:
216+
wandb.log({k: v for k, v in logs.items() if v is not None}, step=state.global_step)
214217
for i, draft_acc in enumerate(average_acc):
215218
for j, step_acc in enumerate(draft_acc):
216219
wandb.log(

0 commit comments

Comments
 (0)