Skip to content

Commit b221dc6

Browse files
authored
Merge branch 'main' into fix-compile-link
2 parents 4c479ee + ebe3e9f commit b221dc6

10 files changed

Lines changed: 427 additions & 315 deletions

File tree

.ci/docker/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ bs4
3232
awscliv2==2.1.1
3333
flask
3434
spacy==3.4.1
35-
ray[tune]==2.7.2
35+
ray[tune]==2.52.1
3636
tensorboard
3737
jinja2==3.1.3
3838
pytorch-lightning
3939
torchx
40-
torchrl==0.9.2
41-
tensordict==0.9.1
40+
torchrl==0.10.1
41+
tensordict==0.10.0
4242
# For ax_multiobjective_nas_tutorial.py
4343
ax-platform>=0.4.0,<0.5.0
4444
nbformat>=5.9.2

.github/workflows/_build-tutorials-base.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
type: number
1515
default: 0
16+
S3_PREFIX:
17+
description: "S3 prefix path for uploading docs preview"
18+
required: false
19+
type: string
20+
default: "pytorch/tutorials"
1621

1722
jobs:
1823
worker:
@@ -187,7 +192,7 @@ jobs:
187192
s3-bucket: doc-previews
188193
if-no-files-found: error
189194
path: docs
190-
s3-prefix: pytorch/tutorials/${{ github.event.pull_request.number }}
195+
s3-prefix: ${{ inputs.S3_PREFIX }}/${{ github.event.pull_request.number }}
191196

192197
- name: Teardown Linux
193198
uses: pytorch/test-infra/.github/actions/teardown-linux@main

.github/workflows/build-tutorials-nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ jobs:
3232
secrets: inherit
3333
with:
3434
USE_NIGHTLY: 1
35-
UPLOAD: 0
35+
UPLOAD: 1
36+
S3_PREFIX: pytorch/tutorials-nightly-preview

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ beginner_source/hymenoptera_data/
2121
intermediate_source/data/
2222
*.zip
2323
MNIST/
24+
data/cifar-10-batches-py/*
25+
*.tar.gz
2426

2527
#builds
2628
_build/
@@ -105,6 +107,7 @@ target/
105107
celerybeat-schedule
106108
# dotenv
107109
.env
110+
.envrc
108111

109112
# virtualenv
110113
venv/
@@ -124,8 +127,10 @@ cleanup.sh
124127
# PyTorch things
125128
*.pt
126129

127-
# VSCode
130+
# IDEs
128131
*.vscode
132+
.cfg/
133+
.cursor
129134

130135
# pyspelling
131136
dictionary.dic

.jenkins/build.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ set -ex
44

55
export BUCKET_NAME=pytorch-tutorial-build-pull-request
66

7+
# Set build prefix based on whether this is a nightly build or not
8+
# This prevents conflicts when both builds run simultaneously
9+
if [ "${USE_NIGHTLY:-0}" -eq 1 ]; then
10+
export BUILD_PREFIX="nightly"
11+
else
12+
export BUILD_PREFIX="stable"
13+
fi
14+
715
# set locale for click dependency in spacy
816
export LC_ALL=C.UTF-8
917
export LANG=C.UTF-8
@@ -122,7 +130,7 @@ if [[ "${JOB_TYPE}" == "worker" ]]; then
122130
# Step 6: Copy generated files to S3, tag with commit ID
123131
if [ "${UPLOAD:-0}" -eq 1 ]; then
124132
7z a worker_${WORKER_ID}.7z docs
125-
awsv2 s3 cp worker_${WORKER_ID}.7z s3://${BUCKET_NAME}/${COMMIT_ID}/worker_${WORKER_ID}.7z
133+
awsv2 s3 cp worker_${WORKER_ID}.7z s3://${BUCKET_NAME}/${BUILD_PREFIX}/${COMMIT_ID}/worker_${WORKER_ID}.7z
126134
fi
127135
elif [[ "${JOB_TYPE}" == "manager" ]]; then
128136
# Step 1: Generate no-plot HTML pages for all tutorials
@@ -136,7 +144,7 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then
136144
# Step 3: Download generated with-plot HTML files and static files from S3, merge into one folder
137145
mkdir -p docs_with_plot/docs
138146
for ((worker_id=1;worker_id<NUM_WORKERS+1;worker_id++)); do
139-
awsv2 s3 cp s3://${BUCKET_NAME}/${COMMIT_ID}/worker_$worker_id.7z worker_$worker_id.7z
147+
awsv2 s3 cp s3://${BUCKET_NAME}/${BUILD_PREFIX}/${COMMIT_ID}/worker_$worker_id.7z worker_$worker_id.7z
140148
7z x worker_$worker_id.7z -oworker_$worker_id
141149
yes | cp -R worker_$worker_id/docs/* docs_with_plot/docs
142150
done
@@ -153,7 +161,7 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then
153161

154162
# Step 6: Copy generated HTML files and static files to S3
155163
7z a manager.7z docs
156-
awsv2 s3 cp manager.7z s3://${BUCKET_NAME}/${COMMIT_ID}/manager.7z
164+
awsv2 s3 cp manager.7z s3://${BUCKET_NAME}/${BUILD_PREFIX}/${COMMIT_ID}/manager.7z
157165

158166
# Step 7: push new HTML files and static files to gh-pages
159167
if [[ "$COMMIT_SOURCE" == "refs/heads/master" || "$COMMIT_SOURCE" == "refs/heads/main" ]]; then

.jenkins/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"duration": 1200
1111
},
1212
"beginner_source/hyperparameter_tuning_tutorial.py": {
13-
"duration": 0
13+
"needs": "linux.g5.4xlarge.nvidia.gpu",
14+
"duration": 1800
1415
},
1516
"advanced_source/dynamic_quantization_tutorial.py": {
1617
"duration": 380

0 commit comments

Comments
 (0)