Skip to content

Commit 2aa69a9

Browse files
authored
Merge branch 'main' into fix/ppo-mujoco-colab
2 parents 0eaffc6 + 05c058d commit 2aa69a9

File tree

73 files changed

+2241
-18160
lines changed

Some content is hidden

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

73 files changed

+2241
-18160
lines changed

.ci/docker/requirements.txt

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

4-
sphinx==5.3.0
5-
sphinx-gallery==0.17.1
4+
# Sphinx dependencies
5+
sphinx==7.2.6
6+
sphinx-gallery==0.19.0
67
sphinx-reredirects==0.1.4
7-
sphinx-design==0.4.0
8-
docutils==0.16
9-
sphinx-copybutton
10-
sphinx_sitemap==2.6.0
11-
pypandoc==1.12
12-
pandocfilters
13-
markdown
8+
sphinx_design==0.6.1
9+
docutils>=0.18.1,<0.21
10+
sphinx-copybutton==0.5.2
11+
sphinx_sitemap==2.7.1
12+
sphinxcontrib-mermaid==1.0.0
13+
sphinxcontrib.katex==0.9.10
14+
pypandoc==1.15
15+
pandocfilters==1.5.1
16+
markdown==3.8.2
17+
18+
19+
# PyTorch Theme
20+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
21+
22+
# Tutorial dependencies
1423
tqdm==4.66.1
1524
numpy==1.24.4
1625
matplotlib
@@ -42,6 +51,7 @@ onnxruntime
4251
evaluate
4352
accelerate>=0.20.1
4453

54+
4555
importlib-metadata==6.8.0
4656

4757
# PyTorch Theme

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ body:
1313
- type: textarea
1414
attributes:
1515
label: Add Link
16-
description: |
16+
description: |
1717
**Add the link to the tutorial***
1818
placeholder: |
1919
Link to the tutorial on the website:
2020
validations:
21-
required: true
21+
required: true
2222
- type: textarea
2323
attributes:
2424
label: Describe the bug
25-
description: |
26-
**Add the bug description**
25+
description: |
26+
**Add the bug description**
2727
placeholder: |
2828
Provide a detailed description of the issue with code samples if relevant
2929
```python

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body:
1818
- type: textarea
1919
attributes:
2020
label: Existing tutorials on this topic
21-
description: |
21+
description: |
2222
**Add a list of existing tutorials on the same topic.**
2323
placeholder: |
2424
List tutorials that already explain this functionality if exist. On pytorch.org or elsewhere.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main():
3030
# if the issue has a docathon label, add all labels from the issue to the PR.
3131
if not docathon_label_present:
3232
print("The 'docathon-h1-2025' label is not present in the issue.")
33-
return
33+
return
3434
pull_request_labels = pull_request.get_labels()
3535
issue_label_names = [label.name for label in issue_labels]
3636
labels_to_add = [label for label in issue_label_names if label not in pull_request_labels]
@@ -39,8 +39,8 @@ def main():
3939
return
4040
pull_request.add_to_labels(*labels_to_add)
4141
print("Labels added to the pull request!")
42-
4342

44-
43+
44+
4545
if __name__ == "__main__":
4646
main()

.github/workflows/MonthlyLinkCheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Runs once a month and checks links in the repo to ensure they are valid
1+
#Runs once a month and checks links in the repo to ensure they are valid
22
#If action fails, it creates an issue with the failing links and an "incorrect link" label
33
#If link is valid but failing, it can be added to the .lycheeignore file
44
#Action can also be run manually as needed.
@@ -34,8 +34,8 @@ jobs:
3434
content-filepath: ./lychee/out.md
3535
labels: 'incorrect link'
3636
#token: ${{ secrets.CUSTOM_TOKEN }}
37-
38-
37+
38+
3939
- name: Suggestions
4040
if: failure()
4141
run: |

.github/workflows/StalePRs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
stale:
2323
if: ${{ github.repository == 'pytorch/tutorials' }}
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-latest
2525
permissions:
2626
contents: read
2727
pull-requests: write
@@ -154,4 +154,3 @@ jobs:
154154
}
155155
}
156156
core.info(`Processed ${numProcessed} PRs total.`);
157-

.github/workflows/link_checkPR.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
issue_number: context.issue.number
3232
});
3333
return labels.data.some(label => label.name === 'skip-link-check');
34-
34+
3535
- name: Check Links
3636
if: steps.skip-label.outputs.result == 'false'
3737
uses: lycheeverse/lychee-action@v1
3838
with:
3939
args: --accept=200,403,429 --base . --verbose --no-progress ${{ steps.changed-files.outputs.all_changed_files }}
4040
token: ${{ secrets.CUSTOM_TOKEN }}
4141
fail: true
42-
42+
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."
@@ -48,7 +48,7 @@ jobs:
4848
- name: No Files to Check
4949
if: steps.skip-label.outputs.result == 'false' && steps.changed-files.outputs.any_changed == 'true'
5050
run: echo "No relevant files were changed in this PR that require link checking."
51-
51+
5252
- name: Suggestions
5353
if: failure()
5454
run: |

.github/workflows/lintrunner.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lintrunner
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lintrunner:
15+
name: lintrunner
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout tutorials
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
23+
with:
24+
python-version: '3.12'
25+
26+
- name: Install Lintrunner
27+
run: |
28+
pip install lintrunner==0.12.5
29+
lintrunner init
30+
31+
- name: Run lintrunner on all files - Linux
32+
run: |
33+
set +e
34+
if ! lintrunner -v --force-color --all-files --tee-json=lint.json; then
35+
echo ""
36+
echo -e "\e[1m\e[36mYou can reproduce these results locally by using \`lintrunner -m main\`.\e[0m"
37+
exit 1
38+
fi

.github/workflows/spelling.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
script: |
1818
let skipCheck = false;
1919
let changedFiles = [];
20-
20+
2121
if (context.eventName === 'pull_request') {
2222
// Check for skip label
2323
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
@@ -26,15 +26,15 @@ jobs:
2626
issue_number: context.issue.number
2727
});
2828
skipCheck = labels.some(label => label.name === 'skip-spell-check');
29-
29+
3030
if (!skipCheck) {
3131
// Get changed files in PR
3232
const { data: files } = await github.rest.pulls.listFiles({
3333
owner: context.repo.owner,
3434
repo: context.repo.repo,
3535
pull_number: context.issue.number
3636
});
37-
37+
3838
changedFiles = files
3939
.filter(file => file.filename.match(/\.(py|rst|md)$/))
4040
.map(file => file.filename);
@@ -43,7 +43,7 @@ jobs:
4343
// For push events, we'll still need to use git diff
4444
// We'll handle this after checkout
4545
}
46-
46+
4747
core.setOutput('skip', skipCheck.toString());
4848
core.setOutput('files', changedFiles.join('\n'));
4949
core.setOutput('is-pr', (context.eventName === 'pull_request').toString());
@@ -73,7 +73,7 @@ jobs:
7373
else
7474
FILES="${{ steps.push-files.outputs.files }}"
7575
fi
76-
76+
7777
if [ -z "$FILES" ]; then
7878
echo "skip=true" >> $GITHUB_OUTPUT
7979
echo "No relevant files changed (*.py, *.rst, *.md), skipping spell check"
@@ -110,7 +110,7 @@ jobs:
110110
else
111111
mapfile -t FILES <<< "${{ steps.push-files.outputs.files }}"
112112
fi
113-
113+
114114
# Check each file individually
115115
FINAL_EXIT_CODE=0
116116
SPELLCHECK_LOG=""

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ cleanup.sh
127127

128128
# pyspelling
129129
dictionary.dic
130+
131+
# linters
132+
/.lintbin

0 commit comments

Comments
 (0)