Skip to content

Commit deef00a

Browse files
committed
Merge remote-tracking branch 'upstream/rc1'
2 parents 8afce8a + 5a45a73 commit deef00a

File tree

168 files changed

+21835
-391
lines changed

Some content is hidden

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

168 files changed

+21835
-391
lines changed

.gitignore

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
beginner
33
intermediate
44
advanced
5+
pytorch_basics
56

67
#data things
78
beginner_source/hymenoptera_data
89
beginner_source/blitz/data
910
beginner_source/faces
11+
beginner_source/hybrid_frontend/data
1012
intermediate_source/data/
1113
advanced_source/images/
1214
*data.zip
@@ -91,8 +93,7 @@ target/
9193
.python-version
9294

9395
# celery beat schedule file
94-
celerybeat-schedule
95-
96+
celerybeat-schedule
9697
# dotenv
9798
.env
9899

@@ -105,3 +106,8 @@ ENV/
105106

106107
# Rope project settings
107108
.ropeproject
109+
110+
# Mac things
111+
.DS_Store
112+
cleanup.sh
113+
*.swp

.jenkins/build.sh

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
sudo apt-get update
2+
sudo apt-get install -y --no-install-recommends unzip p7zip-full sox libsox-dev libsox-fmt-all
3+
4+
# Install a nightly build of pytorch
5+
6+
# GPU, requires CUDA version 8.0
7+
pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu80/torch_nightly.html
8+
9+
# GPU, requires CUDA version 9.0
10+
# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu90/torch_nightly.html
11+
12+
# GPU, requires CUDA version 9.2
13+
# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html
14+
15+
# CPU
16+
# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
17+
18+
19+
export PATH=/opt/conda/bin:$PATH
20+
# pillow >= 4.2 will throw error when trying to write mode RGBA as JPEG,
21+
# this is a workaround to the issue.
22+
conda install -y sphinx==1.7.9 pandas pillow=4.1.1
23+
# PyTorch Theme
24+
rm -rf src
25+
pip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
26+
pip install sphinx-gallery tqdm matplotlib ipython
27+
28+
git clone https://github.com/pytorch/vision --quiet
29+
pushd vision
30+
pip install . --no-deps # We don't want it to install the stock PyTorch version from pip
31+
popd
32+
33+
git clone https://github.com/pytorch/audio --quiet
34+
pushd audio
35+
python setup.py install
36+
popd
37+
38+
# Download dataset for beginner_source/dcgan_faces_tutorial.py
39+
curl https://s3.amazonaws.com/pytorch-tutorial-assets/img_align_celeba.zip --output img_align_celeba.zip
40+
sudo mkdir -p /home/ubuntu/facebook/datasets/celeba
41+
sudo chmod -R 0777 /home/ubuntu/facebook/datasets/celeba
42+
unzip img_align_celeba.zip -d /home/ubuntu/facebook/datasets/celeba > null
43+
44+
# Download dataset for beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py
45+
mkdir data/
46+
curl https://s3.amazonaws.com/pytorch-tutorial-assets/iris.data --output data/iris.data
47+
48+
# Download dataset for beginner_source/chatbot_tutorial.py
49+
curl https://s3.amazonaws.com/pytorch-tutorial-assets/cornell_movie_dialogs_corpus.zip --output cornell_movie_dialogs_corpus.zip
50+
mkdir -p beginner_source/data
51+
unzip cornell_movie_dialogs_corpus.zip -d beginner_source/data/ > null
52+
53+
# Download dataset for beginner_source/audio_classifier_tutorial.py
54+
curl https://s3.amazonaws.com/pytorch-tutorial-assets/UrbanSound8K.tar.gz --output UrbanSound8K.tar.gz
55+
tar -xzf UrbanSound8K.tar.gz -C ./beginner_source
56+
57+
# Download model for beginner_source/fgsm_tutorial.py
58+
curl https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model.pth --output ./beginner_source/lenet_mnist_model.pth
59+
60+
# We will fix the hybrid frontend tutorials when the API is stable
61+
rm beginner_source/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial.py
62+
rm beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py
63+
64+
make docs
65+
66+
rm -rf vision
67+
rm -rf audio

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ help:
1818
# Catch-all target: route all unknown targets to Sphinx using the new
1919
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2020
%: Makefile
21-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -v
2222

2323
download:
2424
# transfer learning tutorial data
@@ -32,6 +32,9 @@ download:
3232
# data loader tutorial
3333
wget -N https://download.pytorch.org/tutorial/faces.zip
3434
unzip -o faces.zip -d beginner_source
35+
36+
wget -N https://download.pytorch.org/models/tutorials/4000_checkpoint.tar
37+
cp 4000_checkpoint.tar beginner_source
3538

3639
# neural style images
3740
rm -rf advanced_source/images/

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ In case you prefer to write your tutorial in jupyter, you can use [this script](
2121

2222
## Building
2323

24-
- Start with installing torch and torchvision. Install other requirements using `pip install -r requirements.txt`
25-
- Then you can build using `make docs`. This will download the data, execute the tutorials and build the documentation to `docs/` directory. However, this will take about 30-60 min based on your system.
26-
- You can skip the execution by running `make html-noplot` to build html documentation to `_build/html`. This way, you can quickly preview your tutorial.
24+
- Start with installing torch, torchvision, and your GPUs latest drivers. Install other requirements using `pip install -r requirements.txt`
25+
- Then you can build using `make docs`. This will download the data, execute the tutorials and build the documentation to `docs/` directory. This will take about 60-120 min for systems with GPUs. If you do not have a GPU installed on your system, then see next step.
26+
- You can skip the computationally intensive graph generation by running `make html-noplot` to build basic html documentation to `_build/html`. This way, you can quickly preview your tutorial.

_static/ajax-loader.gif

673 Bytes
Loading

0 commit comments

Comments
 (0)