We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07b4774 commit 919ce6fCopy full SHA for 919ce6f
1 file changed
plugins/online-data-mixing/artifacts/custom_loop_usage.py
@@ -91,8 +91,8 @@ class State:
91
accelerator.backward(loss)
92
optimizer.step()
93
optimizer.zero_grad()
94
- if step % 1 == 0 and accelerator.is_main_process:
95
- print(f"Step {step} | Loss: {loss.item():.4f}")
+ if step_idx % 1 == 0 and accelerator.is_main_process:
+ print(f"Step {step_idx} ||| Loss: {loss.item():.4f}")
96
state.log_history.append(
97
{"loss": loss.item() if not torch.isnan(loss) else 1e100}
98
)
0 commit comments