Skip to content

Commit a7369d0

Browse files
committed
Fix errors caused by memory_format_tutorial
1 parent cca97f0 commit a7369d0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.circleci/scripts/build_for_windows.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,17 @@ python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tut
4444
python $DIR/remove_runnable_code.py beginner_source/data_loading_tutorial.py beginner_source/data_loading_tutorial.py || true
4545
python $DIR/remove_runnable_code.py beginner_source/dcgan_faces_tutorial.py beginner_source/dcgan_faces_tutorial.py || true
4646
python $DIR/remove_runnable_code.py intermediate_source/model_parallel_tutorial.py intermediate_source/model_parallel_tutorial.py || true
47-
python $DIR/remove_runnable_code.py advanced_source/static_quantization_tutorial.py advanced_source/static_quantization_tutorial.py || true
48-
python $DIR/remove_runnable_code.py prototype_source/numeric_suite_tutorial.py || true
49-
python $DIR/remove_runnable_code.py prototype_source/graph_mode_static_quantization_tutorial.py || true
47+
48+
echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.Tensor).keys()))" >> intermediate_source/memory_format_tutorial.py
49+
echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py
50+
echo " delattr(torch.Tensor, attr)" >> intermediate_source/memory_format_tutorial.py
51+
echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.nn.functional).keys()))" >> intermediate_source/memory_format_tutorial.py
52+
echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py
53+
echo " delattr(torch.nn.functional, attr)" >> intermediate_source/memory_format_tutorial.py
54+
echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch).keys()))" >> intermediate_source/memory_format_tutorial.py
55+
echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py
56+
echo " delattr(torch, attr)" >> intermediate_source/memory_format_tutorial.py
57+
echo "from importlib import reload" >> intermediate_source/memory_format_tutorial.py
58+
echo "reload(torch)" >> intermediate_source/memory_format_tutorial.py
5059

5160
make docs

0 commit comments

Comments
 (0)