Skip to content

Commit 9a67b5c

Browse files
authored
Collect unused memory
1 parent 38b9a9c commit 9a67b5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
sys.path.insert(0, os.path.abspath('./.jenkins'))
3434
import pytorch_sphinx_theme
3535
import torch
36+
import gc
3637
import glob
3738
import random
3839
import shutil
@@ -90,6 +91,7 @@ def reset_seeds(gallery_conf, fname):
9091
torch.manual_seed(42)
9192
torch.set_default_device(None)
9293
random.seed(10)
94+
gc.collect()
9395

9496
sphinx_gallery_conf = {
9597
'examples_dirs': ['beginner_source', 'intermediate_source',

0 commit comments

Comments
 (0)