We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e3b5bf commit e5a60ffCopy full SHA for e5a60ff
tests/tests_pytorch/trainer/test_trainer.py
@@ -1750,8 +1750,6 @@ def current_memory():
1750
gc.collect()
1751
return torch.cuda.memory_allocated(0)
1752
1753
- initial = current_memory()
1754
-
1755
model = TestModel()
1756
trainer_kwargs = {
1757
"default_root_dir": tmp_path,
@@ -1763,6 +1761,7 @@ def current_memory():
1763
1761
"callbacks": Check(),
1764
1762
}
1765
trainer = Trainer(**trainer_kwargs)
+ initial = current_memory()
1766
trainer.fit(model)
1767
1768
assert trainer.strategy.model is model
0 commit comments