Skip to content

Commit 8935069

Browse files
committed
apply v1.5, pytorch/tutorials#f7d7360 (PyTorchKorea#68)
1 parent 4ed2ab7 commit 8935069

File tree

102 files changed

+5337
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+5337
-545
lines changed

β€Ž.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/beginner
33
/intermediate
44
/advanced
5+
/recipes
56

67
#data things
78
_data/

β€Ž.jenkins/build.sh

+14-4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
7676
FILES_TO_RUN+=($(basename $filename .py))
7777
fi
7878
count=$((count+1))
79+
done
80+
for filename in $(find recipes_source/ -name '*.py' -not -path '*/data/*'); do
81+
if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then
82+
echo "Removing runnable code from "$filename
83+
python $DIR/remove_runnable_code.py $filename $filename
84+
else
85+
echo "Keeping "$filename
86+
FILES_TO_RUN+=($(basename $filename .py))
87+
fi
88+
count=$((count+1))
7989
done
8090
echo "FILES_TO_RUN: " ${FILES_TO_RUN[@]}
8191

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

8595
# Step 4: If any of the generated files are not related the tutorial files we want to run,
8696
# then we remove them
87-
for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.html'); do
97+
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.html'); do
8898
file_basename=$(basename $filename .html)
8999
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
90100
rm $filename
91101
fi
92102
done
93-
for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.rst'); do
103+
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.rst'); do
94104
file_basename=$(basename $filename .rst)
95105
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
96106
rm $filename
@@ -108,13 +118,13 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
108118
rm $filename
109119
fi
110120
done
111-
for filename in $(find docs/_sources/beginner docs/_sources/intermediate docs/_sources/advanced -name '*.rst.txt'); do
121+
for filename in $(find docs/_sources/beginner docs/_sources/intermediate docs/_sources/advanced docs/_sources/recipes -name '*.rst.txt'); do
112122
file_basename=$(basename $filename .rst.txt)
113123
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
114124
rm $filename
115125
fi
116126
done
117-
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced -name '*.doctree'); do
127+
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes -name '*.doctree'); do
118128
file_basename=$(basename $filename .doctree)
119129
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
120130
rm $filename

β€ŽMakefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DATADIR = _data
1414
GH_PAGES_SOURCES = $(SOURCEDIR) Makefile
1515

1616
ZIPOPTS ?= -qo
17-
TAROPTS ?= -xzf
17+
TAROPTS ?=
1818

1919
# Put it first so that "make" without argument is like "make help".
2020
help:
@@ -78,7 +78,7 @@ download:
7878

7979
# Download dataset for beginner_source/audio_classifier_tutorial.py
8080
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/UrbanSound8K.tar.gz -P $(DATADIR)
81-
tar $(TAROPTS) $(DATADIR)/UrbanSound8K.tar.gz -C ./beginner_source/data/
81+
tar $(TAROPTS) -xzf $(DATADIR)/UrbanSound8K.tar.gz -C ./beginner_source/data/
8282

8383
# Download model for beginner_source/fgsm_tutorial.py
8484
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model.pth -P $(DATADIR)
@@ -108,11 +108,12 @@ docs:
108108
touch docs/.nojekyll
109109

110110
html-noplot:
111+
make clean
111112
$(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"
112-
bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html"
113+
# bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html"
113114
@echo
114115
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
115116

116117
clean-cache:
117118
make clean
118-
rm -rf advanced beginner intermediate
119+
rm -rf advanced beginner intermediate recipes

β€ŽREADME.md

+8-5
3.54 KB
3.5 KB

β€Ž_static/img/memory_format_logo.png

2.87 KB
160 KB
66.5 KB
183 KB
13.5 KB
348 KB

0 commit comments

Comments
Β (0)