Skip to content

Commit 4d03a2e

Browse files
authored
Log trainer callback metrics to run (#47)
1 parent 0133009 commit 4d03a2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dreadnode/integrations/transformers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def on_epoch_begin(
123123
if self._run is None or state.epoch is None:
124124
return
125125

126-
dn.log_metric("epoch", state.epoch)
126+
dn.log_metric("epoch", state.epoch, to="run")
127127

128128
self._epoch_span = dn.task_span(f"Epoch {state.epoch}")
129129
self._epoch_span.__enter__()
@@ -149,7 +149,7 @@ def on_step_begin(
149149
if self._run is None:
150150
return
151151

152-
dn.log_metric("step", state.global_step)
152+
dn.log_metric("step", state.global_step, to="run")
153153

154154
self._step_span = dn.span(f"Step {state.global_step}")
155155
self._step_span.__enter__()
@@ -178,6 +178,6 @@ def on_log(
178178

179179
for key, value in _clean_keys(logs).items():
180180
if isinstance(value, float | int):
181-
dn.log_metric(key, value, step=state.global_step)
181+
dn.log_metric(key, value, step=state.global_step, to="run")
182182

183183
dn.push_update()

0 commit comments

Comments
 (0)