Skip to content

Commit 11aefd3

Browse files
authored
Merge branch 'main' into svekars-patch-38
2 parents c5a2861 + 8476a99 commit 11aefd3

File tree

72 files changed

+444
-9474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+444
-9474
lines changed

.ci/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ IMAGE_NAME="$1"
1111
shift
1212

1313
export UBUNTU_VERSION="22.04"
14-
export CUDA_VERSION="12.4.1"
14+
export CUDA_VERSION="12.6.3"
1515

1616
export BASE_IMAGE="nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}"
1717
echo "Building ${IMAGE_NAME} Docker image"

.ci/docker/requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# --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.
22
# Refer to ./jenkins/build.sh for tutorial build instructions
33

4-
sphinx==5.0.0
4+
sphinx==5.3.0
55
sphinx-gallery==0.11.1
6-
sphinx_design
6+
sphinx-reredirects==0.1.4
7+
sphinx-design==0.4.0
78
docutils==0.16
89
sphinx-copybutton
910
sphinx_sitemap==2.6.0
@@ -34,7 +35,6 @@ ax-platform>=0.4.0
3435
nbformat>=5.9.2
3536
datasets
3637
transformers
37-
torchmultimodal-nightly # needs to be updated to stable as soon as it's avaialable
3838
onnx
3939
onnxscript>=0.2.2
4040
onnxruntime
@@ -63,7 +63,6 @@ gym-super-mario-bros==7.4.0
6363
pyopengl
6464
gymnasium[mujoco]==0.27.0
6565
timm
66-
iopath
6766
pygame==2.6.0
6867
pycocotools
6968
semilearn==0.3.2

.github/scripts/check_redirects.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
if [ "$CURRENT_BRANCH" == "$BASE_BRANCH" ]; then
4+
echo "Running on $BASE_BRANCH branch. Skipping check."
5+
exit 0
6+
fi
7+
8+
9+
# Get list of deleted or renamed files in this branch compared to base
10+
DELETED_FILES=$(git diff --name-status $BASE_BRANCH $CURRENT_BRANCH --diff-filter=DR | awk '{print $2}' | grep -E '\.(rst|py|md)$' | grep -v 'redirects.py')
11+
# Check if any deleted or renamed files were found
12+
if [ -z "$DELETED_FILES" ]; then
13+
echo "No deleted or renamed files found. Skipping check."
14+
exit 0
15+
fi
16+
17+
echo "Deleted or renamed files:"
18+
echo "$DELETED_FILES"
19+
20+
# Check if redirects.py has been updated
21+
REDIRECTS_UPDATED=$(git diff --name-status $BASE_BRANCH $CURRENT_BRANCH --diff-filter=AM | grep 'redirects.py' && echo "yes" || echo "no")
22+
23+
if [ "$REDIRECTS_UPDATED" == "no" ]; then
24+
echo "ERROR: Files were deleted or renamed but redirects.py was not updated. Please update .github/scripts/redirects.py to redirect these files."
25+
exit 1
26+
fi
27+
28+
# Check if each deleted file has a redirect entry
29+
MISSING_REDIRECTS=0
30+
for FILE in $DELETED_FILES; do
31+
# Convert file path to URL path format (remove extension and adjust path)
32+
REDIRECT_PATH=$(echo $FILE | sed -E 's/(.+)_source\/(.+)\.(py|rst|md)$/\1\/\2.html/')
33+
34+
# Check if this path exists in redirects.py as a key. We don't check for values.
35+
if ! grep -q "\"$REDIRECT_PATH\":" redirects.py; then
36+
echo "ERROR: Missing redirect for deleted file: $FILE (should have entry for \"$REDIRECT_PATH\")"
37+
MISSING_REDIRECTS=1
38+
fi
39+
done
40+
41+
if [ $MISSING_REDIRECTS -eq 1 ]; then
42+
echo "ERROR: Please add redirects for all deleted/renamed files to redirects.py"
43+
exit 1
44+
fi
45+
46+
echo "All deleted/renamed files have proper redirects. Check passed!"

.github/scripts/docathon-label-sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def main():
2525
issue_number = int(re.findall(r'#(\d{1,5})', pull_request_body)[0])
2626
issue = repo.get_issue(issue_number)
2727
issue_labels = issue.labels
28-
docathon_label_present = any(label.name == 'docathon-h1-2024' for label in issue_labels)
28+
docathon_label_present = any(label.name == 'docathon-h1-2025' for label in issue_labels)
2929

3030
# if the issue has a docathon label, add all labels from the issue to the PR.
3131
if not docathon_label_present:
32-
print("The 'docathon-h1-2024' label is not present in the issue.")
32+
print("The 'docathon-h1-2025' label is not present in the issue.")
3333
return
3434
pull_request_labels = pull_request.get_labels()
3535
issue_label_names = [label.name for label in issue_labels]

.github/workflows/check-redirects.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check Redirects for Deleted or Renamed Files
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '*/**/*.rst'
7+
- '*/**/*.py'
8+
- '*/**/*.md'
9+
10+
jobs:
11+
check-redirects:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run redirect check script
20+
run: |
21+
chmod +x ./.github/scripts/check_redirects.sh
22+
./.github/scripts/check_redirects.sh
23+
env:
24+
BASE_BRANCH: ${{ github.base_ref }}
25+
CURRENT_BRANCH: ${{ github.head_ref }}

.github/workflows/docathon-assign.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
repo: context.repo.repo,
2929
issue_number: issueNumber
3030
});
31-
const hasLabel = issue.labels.some(label => label.name === 'docathon-h1-2024');
31+
const hasLabel = issue.labels.some(label => label.name === 'docathon-h1-2025');
3232
if (hasLabel) {
3333
if (issue.assignee !== null) {
3434
await github.rest.issues.createComment({
3535
owner: context.repo.owner,
3636
repo: context.repo.repo,
3737
issue_number: issueNumber,
38-
body: "The issue is already assigned. Please pick an opened and unnasigned issue with the [docathon-h1-2024 label](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2024)."
38+
body: "The issue is already assigned. Please pick an opened and unnasigned issue with the [docathon-h1-2025 label](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2025)."
3939
});
4040
} else {
4141
await github.rest.issues.addAssignees({
@@ -46,7 +46,7 @@ jobs:
4646
});
4747
}
4848
} else {
49-
const commmentMessage = "This issue does not have the correct label. Please pick an opened and unnasigned issue with the [docathon-h1-2024 label](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2024)."
49+
const commmentMessage = "This issue does not have the correct label. Please pick an opened and unnasigned issue with the [docathon-h1-2025 label](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2025)."
5050
await github.rest.issues.createComment({
5151
owner: context.repo.owner,
5252
repo: context.repo.repo,

.github/workflows/link_checkPR.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ jobs:
4343
- name: Skip Message
4444
if: steps.skip-label.outputs.result == 'true'
4545
run: echo "Link check was skipped due to the presence of the 'skip-link-check' label."
46-
46+
47+
# Per tj-actions, a delete file is not a changed file so this ensures lint checking does not occur on deleted files
48+
- name: No Files to Check
49+
if: steps.skip-label.outputs.result == 'false' && steps.changed-files.outputs.any_changed == 'true'
50+
run: echo "No relevant files were changed in this PR that require link checking."
51+
4752
- name: Suggestions
4853
if: failure()
4954
run: |

.jenkins/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then
151151
# Step 7: push new HTML files and static files to gh-pages
152152
if [[ "$COMMIT_SOURCE" == "refs/heads/master" || "$COMMIT_SOURCE" == "refs/heads/main" ]]; then
153153
git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
154+
# Clean up directories that contain tutorials
155+
156+
for dir in beginner intermediate prototype recipes advanced distributed vision text audio; do
157+
rm -rf "gh-pages/$dir"
158+
done
159+
154160
cp -r docs/* gh-pages/
155161
pushd gh-pages
156162
# DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!

.jenkins/validate_tutorials_built.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"recipes_source/recipes/timer_quick_start",
4949
"recipes_source/recipes/amp_recipe",
5050
"recipes_source/recipes/Captum_Recipe",
51-
"intermediate_source/flask_rest_api_tutorial",
5251
"intermediate_source/text_to_speech_with_torchaudio",
5352
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
5453
"advanced_source/semi_structured_sparse", # reenable after 3303 is fixed.

.lycheeignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@ https://pytorch.org/tutorials/beginner/colab/n
1313
# Ignore local host link from intermediate_source/tensorboard_tutorial.rst
1414
http://localhost:6006
1515

16-
# Ignore local host link from recipes_source/deployment_with_flask.rst
17-
http://localhost:5000/predict
18-
1916
# Ignore local host link from advanced_source/cpp_frontend.rst
2017
https://www.uber.com/blog/deep-neuroevolution/

0 commit comments

Comments
 (0)