Skip to content

Commit 5bd12b9

Browse files
committed
Merge branch 'release/1.6' of github.com:xta0/tutorials into release/1.6
2 parents 89efbf2 + 9b531a4 commit 5bd12b9

13 files changed

+1726
-41
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ beginner
33
intermediate
44
advanced
55
pytorch_basics
6+
recipes
67

78
#data things
89
_data/
@@ -31,6 +32,7 @@ __pycache__/
3132
*.so
3233

3334
# Distribution / packaging
35+
src/
3436
.Python
3537
env/
3638
build/

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ docs:
108108
touch docs/.nojekyll
109109

110110
html-noplot:
111-
make clean
112111
$(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"
113112
# bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html"
114113
@echo

_static/img/rpc-images/batch.png

19.7 KB
Loading
Loading

conf.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import glob
3636
import shutil
3737
from custom_directives import IncludeDirective, GalleryItemDirective, CustomGalleryItemDirective, CustomCalloutItemDirective, CustomCardItemDirective
38+
import distutils.file_util
39+
import re
3840

3941

4042
try:
@@ -63,10 +65,19 @@
6365
'examples_dirs': ['beginner_source', 'intermediate_source',
6466
'advanced_source', 'recipes_source'],
6567
'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'recipes'],
66-
'filename_pattern': os.environ.get('GALLERY_PATTERN', r'tutorial.py'),
6768
'backreferences_dir': False
6869
}
6970

71+
if os.getenv('GALLERY_PATTERN'):
72+
# GALLERY_PATTERN is to be used when you want to work on a single
73+
# tutorial. Previously this was fed into filename_pattern, but
74+
# if you do that, you still end up parsing all of the other Python
75+
# files which takes a few seconds. This strategy is better, as
76+
# ignore_pattern also skips parsing.
77+
# See https://github.com/sphinx-gallery/sphinx-gallery/issues/721
78+
# for a more detailed description of the issue.
79+
sphinx_gallery_conf['ignore_pattern'] = r'/(?!' + re.escape(os.getenv('GALLERY_PATTERN')) + r')[^/]+$'
80+
7081
for i in range(len(sphinx_gallery_conf['examples_dirs'])):
7182
gallery_dir = sphinx_gallery_conf['gallery_dirs'][i]
7283
source_dir = sphinx_gallery_conf['examples_dirs'][i]
@@ -78,7 +89,7 @@
7889

7990
# Copy rst files from source dir to gallery dir
8091
for f in glob.glob(os.path.join(source_dir, '*.rst')):
81-
shutil.copy(f, gallery_dir)
92+
distutils.file_util.copy_file(f, gallery_dir, update=True)
8293

8394

8495
# Add any paths that contain templates here, relative to this directory.

index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,20 @@ Welcome to PyTorch Tutorials
339339
:link: intermediate/rpc_param_server_tutorial.html
340340
:tags: Parallel-and-Distributed-Training
341341

342+
.. customcarditem::
343+
:header: Distributed Pipeline Parallelism Using RPC
344+
:card_description: Demonstrate how to implement distributed pipeline parallelism using RPC
345+
:image: _static/img/thumbnails/cropped/Distributed-Pipeline-Parallelism-Using-RPC.png
346+
:link: intermediate/dist_pipeline_parallel_tutorial.html
347+
:tags: Parallel-and-Distributed-Training
348+
349+
.. customcarditem::
350+
:header: Implementing Batch RPC Processing Using Asynchronous Executions
351+
:card_description: Learn how to use rpc.functions.async_execution to implement batch RPC
352+
:image: _static/img/thumbnails/cropped/Implementing-Batch-RPC-Processing-Using-Asynchronous-Executions.png
353+
:link: intermediate/rpc_async_execution.html
354+
:tags: Parallel-and-Distributed-Training
355+
342356
.. End of tutorial card section
343357
344358
.. raw:: html
@@ -505,3 +519,5 @@ Additional Resources
505519
intermediate/rpc_tutorial
506520
beginner/aws_distributed_training_tutorial
507521
intermediate/rpc_param_server_tutorial
522+
intermediate/dist_pipeline_parallel_tutorial
523+
intermediate/rpc_async_execution

0 commit comments

Comments
 (0)