mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix unused Python variables in test/[e-z]* (#136964)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136964 Approved by: https://github.com/justinchuby, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
d298bd840f
commit
d8c8ba2440
@ -95,12 +95,12 @@ class TestModuleTracker(TestCase):
|
||||
inp = torch.rand(1, 2, requires_grad=True)
|
||||
|
||||
# Should not fail
|
||||
with ModuleTracker() as tracker:
|
||||
with ModuleTracker():
|
||||
res = mod(inp)
|
||||
res.sum().backward()
|
||||
|
||||
# Should not fail
|
||||
with ModuleTracker() as tracker:
|
||||
with ModuleTracker():
|
||||
res = checkpoint(lambda inp: mod(inp), inp)
|
||||
res.sum().backward()
|
||||
|
||||
|
Reference in New Issue
Block a user