From 0bfb937710b0ff02cd4b5afda826de90bc022d94 Mon Sep 17 00:00:00 2001 From: Sun Peng Date: Sat, 8 Jul 2023 17:08:19 +0800 Subject: [PATCH] fix(no_pp_scheduler): drop out and label if not used --- internlm/core/no_pipeline_scheduler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internlm/core/no_pipeline_scheduler.py b/internlm/core/no_pipeline_scheduler.py index 6cd8416..1f201e5 100644 --- a/internlm/core/no_pipeline_scheduler.py +++ b/internlm/core/no_pipeline_scheduler.py @@ -269,9 +269,9 @@ class NonPipelineScheduler(BaseScheduler): if return_loss: loss += _loss - - outputs.append(_output) - labels.append(_label) + if return_output_label: + outputs.append(_output) + labels.append(_label) if not return_output_label: outputs, labels = None, None