Skip to content

Add new theme #3310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
8 changes: 4 additions & 4 deletions .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# --extra-index-url https://download.pytorch.org/whl/cu117/index.html # Use this to run/publish tutorials against the latest binaries during the RC stage. Comment out after the release. Each release verify the correct cuda version.
# Refer to ./jenkins/build.sh for tutorial build instructions

sphinx==5.0.0
sphinx==5.3.0
sphinx-gallery==0.11.1
sphinx_design
sphinxext-opengraph==0.9.1
docutils==0.16
sphinx-copybutton
sphinx_sitemap==2.6.0
Expand Down Expand Up @@ -40,12 +41,11 @@ onnxscript
onnxruntime
evaluate
accelerate>=0.20.1

sphinxcontrib-mermaid==1.0.0
importlib-metadata==6.8.0

# PyTorch Theme
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme

-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@8910563ac5d1be380a1c67368090092f1619fcee#egg=pytorch_sphinx_theme2
ipython

sphinxcontrib.katex
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ MNIST/
#builds
_build/
_static/thumbs/
sg_execution_times.rst

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
13 changes: 9 additions & 4 deletions .jenkins/insert_last_verified.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from bs4 import BeautifulSoup


json_file_path = "tutorials-review-data.json"

# paths to skip from the post-processing script
Expand All @@ -31,6 +30,7 @@
"": "", # root dir for index.rst
}


def get_git_log_date(file_path, git_log_args):
try:
result = subprocess.run(
Expand All @@ -46,13 +46,17 @@ def get_git_log_date(file_path, git_log_args):
pass
raise ValueError(f"Could not find date for {file_path}")


def get_creation_date(file_path):
return get_git_log_date(file_path, ["--diff-filter=A", "--format=%aD"]).strftime("%b %d, %Y")
return get_git_log_date(file_path, ["--diff-filter=A", "--format=%aD"]).strftime(
"%b %d, %Y"
)


def get_last_updated_date(file_path):
return get_git_log_date(file_path, ["-1", "--format=%aD"]).strftime("%b %d, %Y")


# Try to find the source file with the given base path and the extensions .rst and .py
def find_source_file(base_path):
for ext in [".rst", ".py"]:
Expand All @@ -63,7 +67,7 @@ def find_source_file(base_path):


# Function to process a JSON file and insert the "Last Verified" information into the HTML files
def process_json_file(build_dir , json_file_path):
def process_json_file(build_dir, json_file_path):
with open(json_file_path, "r", encoding="utf-8") as json_file:
json_data = json.load(json_file)

Expand Down Expand Up @@ -148,13 +152,14 @@ def main():
exit(1)
build_dir = sys.argv[1]
print(f"Build directory: {build_dir}")
process_json_file(build_dir , json_file_path)
process_json_file(build_dir, json_file_path)
print(
"Finished processing JSON file. Please check the output for any warnings. "
"Pages like `nlp/index.html` are generated only during the full `make docs` "
"or `make html` build. Warnings about these files when you run `make html-noplot` "
"can be ignored."
)


if __name__ == "__main__":
main()
264 changes: 0 additions & 264 deletions _static/doctools.js

This file was deleted.

9 changes: 0 additions & 9 deletions _static/documentation_options.js

This file was deleted.

Binary file added _static/img/social-share.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading