We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 764f118 commit 5171404Copy full SHA for 5171404
examples/hello-world/step-by-step/cifar10/code/fl/train_with_mlflow.py
@@ -139,7 +139,7 @@ def evaluate(input_weights):
139
running_loss += loss.item()
140
if i % 2000 == 1999: # print every 2000 mini-batches
141
print(f"({client_id}) [{epoch + 1}, {i + 1:5d}] loss: {running_loss / 2000:.3f}")
142
- global_step = input_model.current_round * local_epochs * batch_size + epoch * batch_size + i
+ global_step = input_model.current_round * steps + epoch * len(trainloader) + i
143
mlflow.log_metric("loss", running_loss / 2000, global_step)
144
running_loss = 0.0
145
0 commit comments