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