"tests/models/vscode:/vscode.git/clone" did not exist on "893ab12452f50f303fcbfe2539e79d05ed8597b3"
Unverified Commit 85395e49 authored by Shiva Zamani's avatar Shiva Zamani Committed by GitHub
Browse files

Remove speed metrics from default compute objective (#10107)

parent 7c7962ba
......@@ -131,6 +131,10 @@ def default_compute_objective(metrics: Dict[str, float]) -> float:
metrics = copy.deepcopy(metrics)
loss = metrics.pop("eval_loss", None)
_ = metrics.pop("epoch", None)
# Remove speed metrics
speed_metrics = [m for m in metrics.keys() if m.endswith("_runtime") or m.endswith("_samples_per_second")]
for sm in speed_metrics:
_ = metrics.pop(sm, None)
return loss if len(metrics) == 0 else sum(metrics.values())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment