Skip to content

Commit 7e3fe6c

Browse files
committed
Fixed metric value for json logging
Signed-off-by: Meet Patel <[email protected]>
1 parent 2034e4d commit 7e3fe6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

QEfficient/finetune/utils/train_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def train(
232232
if train_config.save_metrics:
233233
train_step_loss.append(loss.detach().float().item())
234234
if train_config.task_type == "seq_classification":
235-
step_metric_val = acc_helper.compute()
235+
step_metric_val = float(acc_helper.compute())
236236
else:
237237
step_metric_val = float(torch.exp(loss.detach().float()))
238238
train_step_metric.append(step_metric_val)

0 commit comments

Comments
 (0)