From 5d0151d7b053fb4422a1c17744739c351f94d151 Mon Sep 17 00:00:00 2001 From: JiaoPL Date: Wed, 18 Oct 2023 19:37:15 +0800 Subject: [PATCH] update trainer_result in ci --- tests/test_training/test_loss.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_training/test_loss.py b/tests/test_training/test_loss.py index a30cfba..f262ab2 100644 --- a/tests/test_training/test_loss.py +++ b/tests/test_training/test_loss.py @@ -1,6 +1,5 @@ import math import os -import subprocess import pytest import torch @@ -198,7 +197,6 @@ def train( ) if gpc.is_rank_for_log(): assert loss is not None and not math.isnan(loss.item()) - global cur_loss_list cur_loss_list.append((loss.item() - moe_loss.item() if moe_loss is not None else loss.item())) timer("fwd-bwd").stop() @@ -206,7 +204,7 @@ def train( trainer_result = trainer.step() assert trainer_result is not None - success_update, _ = trainer_result + success_update, _, _ = trainer_result assert success_update, "Error: grad norm inf or nan occurs!" if success_update: # update parameters successfully train_state.step_count += 1