From 74327d386aeec7f113f7cf58c085fa5b0b4a6beb Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Wed, 9 Jul 2025 21:54:33 -0700 Subject: [PATCH] tc --- .ci/docker/requirements.txt | 5 +++-- custom_directives.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/docker/requirements.txt b/.ci/docker/requirements.txt index dae2606eaf7..58e73327ca7 100644 --- a/.ci/docker/requirements.txt +++ b/.ci/docker/requirements.txt @@ -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 @@ -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 diff --git a/custom_directives.py b/custom_directives.py index 388aa262e6e..d989723f190 100644 --- a/custom_directives.py +++ b/custom_directives.py @@ -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 = ''