diff --git a/.jenkins/build.sh b/.jenkins/build.sh index d8f9fc28cfc..95ad25d52da 100755 --- a/.jenkins/build.sh +++ b/.jenkins/build.sh @@ -86,6 +86,16 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then FILES_TO_RUN+=($(basename $filename .py)) fi count=$((count+1)) + 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 +104,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 +134,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 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 } 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. 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 +------------------