[distributed] Remove unused variable in test_composability/test_pp_composability.py (#143191)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143191
Approved by: https://github.com/mori360
This commit is contained in:
Tom Ritchford 2024-12-13 12:55:25 +00:00 committed by PyTorch MergeBot
parent de484134e4
commit 91bf2e16de

View file

@ -537,12 +537,6 @@ class ComposabilityTest(MultiProcessTestCase):
else:
pipeline_schedule.step()
# accumulate losses across pipeline microbatches
loss = (
torch.mean(torch.stack(losses))
if is_last_stage
else torch.Tensor([-1.0])
)
for optimizer in optimizers:
optimizer.step()