Skip to content

Commit 60b5354

Browse files
TroyGardenfacebook-github-bot
authored andcommitted
fix github docs build issue updating to pytorch-sphinx-theme2 (#3670)
Summary: # context * github docs workflow started to [fail](https://github.com/meta-pytorch/torchrec/actions/runs/21075728300/job/60616964631) ``` Run conda run -n build_binary python -m pip install -r docs/requirements.txt Running command git clone --filter=blob:none --quiet https://github.com/pytorch/pytorch_sphinx_theme.git /home/runner/work/torchrec/torchrec/src/pytorch-sphinx-theme WARNING: Generating metadata for package pytorch_sphinx_theme produced metadata for project name pytorch-sphinx-theme2. Fix your #egg=pytorch_sphinx_theme fragments. ERROR: Could not find a version that satisfies the requirement pytorch-sphinx-theme (unavailable) (from versions: 0.0.18, 0.0.19) ERROR: No matching distribution found for pytorch-sphinx-theme (unavailable) ERROR conda.cli.main_run:execute(127): `conda run python -m pip install -r docs/requirements.txt` failed. (See above for error) Obtaining pytorch_sphinx_theme from git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme (from -r docs/requirements.txt (line 7)) Cloning https://github.com/pytorch/pytorch_sphinx_theme.git to ./src/pytorch-sphinx-theme Resolved https://github.com/pytorch/pytorch_sphinx_theme.git to commit f532205d356b644f30b8bbd5c08699b250ca9dd0 Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'done' Preparing editable metadata (pyproject.toml): started Preparing editable metadata (pyproject.toml): finished with status 'done' Discarding git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme: Requested pytorch-sphinx-theme2 from git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme (from -r docs/requirements.txt (line 7)) has inconsistent name: expected 'pytorch-sphinx-theme', but metadata has 'pytorch-sphinx-theme2' Collecting sphinx==5.0.0 (from -r docs/requirements.txt (line 1)) Downloading Sphinx-5.0.0-py3-none-any.whl.metadata (7.9 kB) Requirement already satisfied: pyre-extensions in /usr/share/miniconda/envs/build_binary/lib/python3.12/site-packages (from -r docs/requirements.txt (line 2)) (0.0.32) Collecting sphinx-design (from -r docs/requirements.txt (line 3)) Downloading sphinx_design-0.6.1-py3-none-any.whl.metadata (5.5 kB) Collecting sphinx_copybutton (from -r docs/requirements.txt (line 4)) Downloading sphinx_copybutton-0.5.2-py3-none-any.whl.metadata (3.2 kB) ``` * update the pytorch-sphinx-theme2 Differential Revision: D90876150
1 parent 2fede9c commit 60b5354

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

.github/workflows/build-wheels-linux.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: Build Linux Wheels
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "docs/*"
7+
- "third_party/*"
8+
- .gitignore
9+
- "*.md"
10+
- ".github/workflows/[bcdprv]*.yml"
11+
- ".github/workflows/unittest_ci.yml"
512
push:
613
branches:
714
- nightly

.github/workflows/unittest_ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ on:
1414
- "third_party/*"
1515
- .gitignore
1616
- "*.md"
17+
- ".github/workflows/[bcdprv]*.yml"
18+
- ".github/workflows/unittest_ci.yml"
1719
pull_request:
1820
paths-ignore:
1921
- "docs/*"
2022
- "third_party/*"
2123
- .gitignore
2224
- "*.md"
25+
- ".github/workflows/[bcdprv]*.yml"
26+
- ".github/workflows/unittest_ci.yml"
2327
workflow_dispatch:
2428
inputs:
2529
channel:

.github/workflows/unittest_ci_cpu.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ on:
1414
- "third_party/*"
1515
- .gitignore
1616
- "*.md"
17+
- ".github/workflows/[bcdprv]*.yml"
18+
- ".github/workflows/unittest_ci.yml"
1719
pull_request:
1820
paths-ignore:
1921
- "docs/*"
2022
- "third_party/*"
2123
- .gitignore
2224
- "*.md"
25+
- ".github/workflows/[bcdprv]*.yml"
26+
- ".github/workflows/unittest_ci.yml"
2327
workflow_dispatch:
2428
inputs:
2529
channel:

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
sphinx==5.0.0
1+
sphinx==7.2.6
2+
sphinx-sitemap==2.7.1
23
pyre-extensions
34
sphinx-design
45
sphinx_copybutton
56
# torch
67
# PyTorch Theme
7-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
8+
pytorch_sphinx_theme2==0.3.0

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import os
2121
import sys
2222

23-
import pytorch_sphinx_theme
23+
import pytorch_sphinx_theme2
2424

2525
current_dir = os.path.dirname(__file__)
2626
target_dir = os.path.abspath(os.path.join(current_dir, "../.."))
@@ -74,8 +74,8 @@
7474
# a list of builtin themes.
7575
#
7676
# html_theme = 'alabaster'
77-
html_theme = "pytorch_sphinx_theme"
78-
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
77+
html_theme = "pytorch_sphinx_theme2"
78+
html_theme_path = [pytorch_sphinx_theme2.get_html_theme_path()]
7979

8080
# Theme options are theme-specific and customize the look and feel of a theme
8181
# further. For a list of options available for each theme, see the

0 commit comments

Comments
 (0)