Skip to content

Commit 23fb4c7

Browse files
author
Jessica Lin
authored
Merge pull request #1058 from jlin27/master
Add new directory for prototype tutorials
2 parents 68c22a0 + 494d037 commit 23fb4c7

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

.jenkins/build.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
8686
FILES_TO_RUN+=($(basename $filename .py))
8787
fi
8888
count=$((count+1))
89+
done
90+
for filename in $(find prototype_source/ -name '*.py' -not -path '*/data/*'); do
91+
if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then
92+
echo "Removing runnable code from "$filename
93+
python $DIR/remove_runnable_code.py $filename $filename
94+
else
95+
echo "Keeping "$filename
96+
FILES_TO_RUN+=($(basename $filename .py))
97+
fi
98+
count=$((count+1))
8999
done
90100
echo "FILES_TO_RUN: " ${FILES_TO_RUN[@]}
91101

@@ -94,13 +104,13 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
94104

95105
# Step 4: If any of the generated files are not related the tutorial files we want to run,
96106
# then we remove them
97-
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.html'); do
107+
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes docs/prototype -name '*.html'); do
98108
file_basename=$(basename $filename .html)
99109
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
100110
rm $filename
101111
fi
102112
done
103-
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.rst'); do
113+
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes docs/prototype -name '*.rst'); do
104114
file_basename=$(basename $filename .rst)
105115
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
106116
rm $filename
@@ -124,7 +134,7 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
124134
rm $filename
125135
fi
126136
done
127-
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes -name '*.doctree'); do
137+
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes docs/.doctrees/prototype -name '*.doctree'); do
128138
file_basename=$(basename $filename .doctree)
129139
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
130140
rm $filename

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363

6464
sphinx_gallery_conf = {
6565
'examples_dirs': ['beginner_source', 'intermediate_source',
66-
'advanced_source', 'recipes_source'],
67-
'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'recipes'],
66+
'advanced_source', 'recipes_source', 'prototype_source'],
67+
'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'recipes', 'prototype'],
6868
'filename_pattern': 'tutorial.py',
6969
'backreferences_dir': False
7070
}

prototype_source/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Prototype Tutorials
2+
3+
This directory contains tutorials demonstrating prototype features in PyTorch.
4+
5+
**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.
6+
7+
*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.

prototype_source/README.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Prototype Tutorials
2+
------------------

0 commit comments

Comments
 (0)