Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Refer to ./jenkins/build.sh for tutorial build instructions

sphinx==5.3.0
sphinx-gallery==0.11.1
sphinx-gallery==0.17.1
sphinx-reredirects==0.1.4
sphinx-design==0.4.0
docutils==0.16
Expand Down Expand Up @@ -31,7 +31,8 @@ pytorch-lightning
torchx
torchrl==0.7.2
tensordict==0.7.2
ax-platform>=0.4.0
# For ax_multiobjective_nas_tutorial.py
ax-platform>=0.4.0,<0.5.0
nbformat>=5.9.2
datasets
transformers
Expand Down Expand Up @@ -68,5 +69,5 @@ pycocotools
semilearn==0.3.2
torchao==0.10.0
segment_anything==1.0
torchrec==1.1.0; platform_system == "Linux"
torchrec==1.2.0; platform_system == "Linux"
fbgemm-gpu==1.2.0; platform_system == "Linux"
1 change: 0 additions & 1 deletion .jenkins/validate_tutorials_built.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"intermediate_source/text_to_speech_with_torchaudio",
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
"advanced_source/semi_structured_sparse", # reenable after 3303 is fixed.
"intermediate_source/torchrec_intro_tutorial", # reenable after 3302 is fixe
]

def tutorial_source_dirs() -> List[Path]:
Expand Down
17 changes: 0 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,6 @@ download:
wget -nv -N https://s3.amazonaws.com/pytorch-tutorial-assets/cornell_movie_dialogs_corpus_v2.zip -P $(DATADIR)
unzip $(ZIPOPTS) $(DATADIR)/cornell_movie_dialogs_corpus_v2.zip -d beginner_source/data/

# Download model for advanced_source/dynamic_quantization_tutorial.py
wget -nv -N https://s3.amazonaws.com/pytorch-tutorial-assets/word_language_model_quantize.pth -P $(DATADIR)
cp $(DATADIR)/word_language_model_quantize.pth advanced_source/data/word_language_model_quantize.pth

# Download data for advanced_source/dynamic_quantization_tutorial.py
wget -nv -N https://s3.amazonaws.com/pytorch-tutorial-assets/wikitext-2.zip -P $(DATADIR)
unzip $(ZIPOPTS) $(DATADIR)/wikitext-2.zip -d advanced_source/data/

# Download model for advanced_source/static_quantization_tutorial.py
wget -nv -N https://download.pytorch.org/models/mobilenet_v2-b0353104.pth -P $(DATADIR)
cp $(DATADIR)/mobilenet_v2-b0353104.pth advanced_source/data/mobilenet_pretrained_float.pth


# Download model for prototype_source/graph_mode_static_quantization_tutorial.py
wget -nv -N https://download.pytorch.org/models/resnet18-5c106cde.pth -P $(DATADIR)
cp $(DATADIR)/resnet18-5c106cde.pth prototype_source/data/resnet18_pretrained_float.pth

# Download PennFudanPed dataset for intermediate_source/torchvision_tutorial.py
wget https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip -P $(DATADIR)
unzip -o $(DATADIR)/PennFudanPed.zip -d intermediate_source/data/
Expand Down
Binary file not shown.
5 changes: 4 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def wrapper(*args, **kwargs):
raise RuntimeError(f"Error in subprocess: {result}")
return wrapper

sphinx_gallery.gen_rst.generate_file_rst = call_in_subprocess(sphinx_gallery.gen_rst.generate_file_rst)
# Windows does not support multiprocessing with fork and mac has issues with
# fork so we do not monkey patch sphinx gallery to run in subprocesses.
if os.getenv("TUTORIALS_ISOLATE_BUILD", "1") == "1" and not sys.platform.startswith("win") and not sys.platform == "darwin":
sphinx_gallery.gen_rst.generate_file_rst = call_in_subprocess(sphinx_gallery.gen_rst.generate_file_rst)

try:
import torchvision
Expand Down
3 changes: 2 additions & 1 deletion custom_directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def run(self):
if 'intro' in self.options:
intro = self.options['intro'][:195] + '...'
else:
_, blocks = sphinx_gallery.gen_rst.split_code_and_text_blocks(abs_fname)
block_parser = sphinx_gallery.gen_rst.BlockParser(abs_fname, {"filetype_parsers": {}})
_, blocks, _ = block_parser.split_code_and_text_blocks(abs_fname)
intro, _ = sphinx_gallery.gen_rst.extract_intro_and_title(abs_fname, blocks[0][1])

thumbnail_rst = ''
Expand Down
Loading