From b6d1838fcb1768d0341acd0526e2bd9e1db529ca Mon Sep 17 00:00:00 2001 From: Jessica Lin Date: Wed, 8 Jul 2020 14:27:39 -0700 Subject: [PATCH 1/5] Add prototype_source directory --- prototype_source/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 prototype_source/README.md diff --git a/prototype_source/README.md b/prototype_source/README.md new file mode 100644 index 00000000000..41003507b84 --- /dev/null +++ b/prototype_source/README.md @@ -0,0 +1,7 @@ +# Prototype Tutorials + +This directory contains tutorials demonstrating prototype features in PyTorch. + +**Prototype features** are not available as part of binary distributions like PyPI or Conda (except maybe behind run-time flags). To test these features we would, depending on the feature, recommend building from master or using the nightly wheelss that are made available on pytorch.org. + +*Level of commitment:* We are committing to gathering high bandwidth feedback only on these features. Based on this feedback and potential further engagement between community members, we as a community will decide if we want to upgrade the level of commitment or to fail fast. From 01fc1306debe681a893c4fa1ac08f588c6ac13a6 Mon Sep 17 00:00:00 2001 From: Jessica Lin Date: Wed, 8 Jul 2020 14:32:11 -0700 Subject: [PATCH 2/5] Add prototype directory --- .jenkins/build.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.jenkins/build.sh b/.jenkins/build.sh index d8f9fc28cfc..3fda35f457f 100755 --- a/.jenkins/build.sh +++ b/.jenkins/build.sh @@ -86,6 +86,17 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then FILES_TO_RUN+=($(basename $filename .py)) fi count=$((count+1)) + done + done + for filename in $(find prototype_source/ -name '*.py' -not -path '*/data/*'); do + if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then + echo "Removing runnable code from "$filename + python $DIR/remove_runnable_code.py $filename $filename + else + echo "Keeping "$filename + FILES_TO_RUN+=($(basename $filename .py)) + fi + count=$((count+1)) done echo "FILES_TO_RUN: " ${FILES_TO_RUN[@]} @@ -94,13 +105,13 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then # Step 4: If any of the generated files are not related the tutorial files we want to run, # then we remove them - for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.html'); do + for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes docs/prototype -name '*.html'); do file_basename=$(basename $filename .html) if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then rm $filename fi done - for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.rst'); do + for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes docs/prototype -name '*.rst'); do file_basename=$(basename $filename .rst) if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then rm $filename @@ -124,7 +135,7 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then rm $filename fi done - for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes -name '*.doctree'); do + for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes docs/.doctrees/prototype -name '*.doctree'); do file_basename=$(basename $filename .doctree) if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then rm $filename From 26511ccdb6def7b4aa53674fe5c2a861418365a8 Mon Sep 17 00:00:00 2001 From: Jessica Lin Date: Wed, 8 Jul 2020 14:33:15 -0700 Subject: [PATCH 3/5] Add prototype --- conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.py b/conf.py index 26d2bb42df6..683abf00899 100644 --- a/conf.py +++ b/conf.py @@ -63,8 +63,8 @@ sphinx_gallery_conf = { 'examples_dirs': ['beginner_source', 'intermediate_source', - 'advanced_source', 'recipes_source'], - 'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'recipes'], + 'advanced_source', 'recipes_source', 'prototype_source'], + 'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'recipes', 'prototype'], 'filename_pattern': 'tutorial.py', 'backreferences_dir': False } From fb779e1f7cfe65269e54878c9993f4cb4222bb87 Mon Sep 17 00:00:00 2001 From: Jessica Lin Date: Wed, 8 Jul 2020 14:57:55 -0700 Subject: [PATCH 4/5] Remove extra "done" --- .jenkins/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.jenkins/build.sh b/.jenkins/build.sh index 3fda35f457f..95ad25d52da 100755 --- a/.jenkins/build.sh +++ b/.jenkins/build.sh @@ -87,7 +87,6 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then fi count=$((count+1)) done - done for filename in $(find prototype_source/ -name '*.py' -not -path '*/data/*'); do if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then echo "Removing runnable code from "$filename From 494d037fcc7ccada21c1dc1003cb82cac11cb02b Mon Sep 17 00:00:00 2001 From: Jessica Lin Date: Wed, 8 Jul 2020 17:03:22 -0700 Subject: [PATCH 5/5] Add REAME.txt --- prototype_source/README.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 prototype_source/README.txt diff --git a/prototype_source/README.txt b/prototype_source/README.txt new file mode 100644 index 00000000000..b04371db306 --- /dev/null +++ b/prototype_source/README.txt @@ -0,0 +1,2 @@ +Prototype Tutorials +------------------