Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Oct 17, 2024
1 parent a16d717 commit 57bb86c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _eval_model_on_split(self,
batch = next(self._eval_iters[split])
batch_metrics = self._eval_model(params, batch, model_rng)
total_metrics = {
k: v + batch_metrics[k] for k, v in total_metrics.items()
k: v + batch_metrics[k] for k, v in total_metrics.items()
}
if USE_PYTORCH_DDP:
for metric in total_metrics.values():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _eval_model_on_split(self,
weights = batch.get('weights')
batch_metrics = self._compute_metrics(logits, batch['targets'], weights)
total_metrics = {
k: v + batch_metrics[k] for k, v in total_metrics.items()
k: v + batch_metrics[k] for k, v in total_metrics.items()
}
if USE_PYTORCH_DDP:
for metric in total_metrics.values():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _eval_model_on_split(self,
'num_words': num_words,
}
total_metrics = {
k: v + batch_metrics[k] for k, v in total_metrics.items()
k: v + batch_metrics[k] for k, v in total_metrics.items()
}
if USE_PYTORCH_DDP:
for metric in total_metrics.values():
Expand Down
2 changes: 1 addition & 1 deletion algorithmic_efficiency/workloads/mnist/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def _eval_model_on_split(self,
model_state,
per_device_model_rngs)
total_metrics = {
k: v + batch_metrics[k] for k, v in total_metrics.items()
k: v + batch_metrics[k] for k, v in total_metrics.items()
}

return self._normalize_eval_metrics(num_examples, total_metrics)

0 comments on commit 57bb86c

Please sign in to comment.