From a7369d02eda39b0afa85a7273426a465e1fc7e60 Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Wed, 5 Aug 2020 15:54:01 +0800 Subject: [PATCH 1/2] Fix errors caused by memory_format_tutorial --- .circleci/scripts/build_for_windows.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.circleci/scripts/build_for_windows.sh b/.circleci/scripts/build_for_windows.sh index 3e8a8faca08..13ce599eba3 100644 --- a/.circleci/scripts/build_for_windows.sh +++ b/.circleci/scripts/build_for_windows.sh @@ -44,8 +44,17 @@ python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tut python $DIR/remove_runnable_code.py beginner_source/data_loading_tutorial.py beginner_source/data_loading_tutorial.py || true python $DIR/remove_runnable_code.py beginner_source/dcgan_faces_tutorial.py beginner_source/dcgan_faces_tutorial.py || true python $DIR/remove_runnable_code.py intermediate_source/model_parallel_tutorial.py intermediate_source/model_parallel_tutorial.py || true -python $DIR/remove_runnable_code.py advanced_source/static_quantization_tutorial.py advanced_source/static_quantization_tutorial.py || true -python $DIR/remove_runnable_code.py prototype_source/numeric_suite_tutorial.py || true -python $DIR/remove_runnable_code.py prototype_source/graph_mode_static_quantization_tutorial.py || true + +echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.Tensor).keys()))" >> intermediate_source/memory_format_tutorial.py +echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py +echo " delattr(torch.Tensor, attr)" >> intermediate_source/memory_format_tutorial.py +echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.nn.functional).keys()))" >> intermediate_source/memory_format_tutorial.py +echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py +echo " delattr(torch.nn.functional, attr)" >> intermediate_source/memory_format_tutorial.py +echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch).keys()))" >> intermediate_source/memory_format_tutorial.py +echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py +echo " delattr(torch, attr)" >> intermediate_source/memory_format_tutorial.py +echo "from importlib import reload" >> intermediate_source/memory_format_tutorial.py +echo "reload(torch)" >> intermediate_source/memory_format_tutorial.py make docs From 1da7e78e7e25fa4fd5e6abb56b04db0a1b3ec98e Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Wed, 5 Aug 2020 16:08:54 +0800 Subject: [PATCH 2/2] just for test --- .circleci/config.yml | 4 ---- .circleci/scripts/build_for_windows.sh | 13 +------------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5697f123d49..8c9c71c130e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -564,8 +564,4 @@ workflows: - master - pytorch_windows_build_worker: name: win_test_worker - filters: - branches: - only: - - master diff --git a/.circleci/scripts/build_for_windows.sh b/.circleci/scripts/build_for_windows.sh index 13ce599eba3..76dceed53f8 100644 --- a/.circleci/scripts/build_for_windows.sh +++ b/.circleci/scripts/build_for_windows.sh @@ -44,17 +44,6 @@ python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tut python $DIR/remove_runnable_code.py beginner_source/data_loading_tutorial.py beginner_source/data_loading_tutorial.py || true python $DIR/remove_runnable_code.py beginner_source/dcgan_faces_tutorial.py beginner_source/dcgan_faces_tutorial.py || true python $DIR/remove_runnable_code.py intermediate_source/model_parallel_tutorial.py intermediate_source/model_parallel_tutorial.py || true - -echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.Tensor).keys()))" >> intermediate_source/memory_format_tutorial.py -echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py -echo " delattr(torch.Tensor, attr)" >> intermediate_source/memory_format_tutorial.py -echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch.nn.functional).keys()))" >> intermediate_source/memory_format_tutorial.py -echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py -echo " delattr(torch.nn.functional, attr)" >> intermediate_source/memory_format_tutorial.py -echo "keys = list(filter(lambda x: not x.startswith('_'), vars(torch).keys()))" >> intermediate_source/memory_format_tutorial.py -echo "for attr in keys:" >> intermediate_source/memory_format_tutorial.py -echo " delattr(torch, attr)" >> intermediate_source/memory_format_tutorial.py -echo "from importlib import reload" >> intermediate_source/memory_format_tutorial.py -echo "reload(torch)" >> intermediate_source/memory_format_tutorial.py +python $DIR/remove_runnable_code.py intermediate_source/memory_format_tutorial.py intermediate_source/memory_format_tutorial.py || true make docs